Skip to content

Commit 031e8b4

Browse files
committed
[chore] cargo fmt changes
1 parent ce73765 commit 031e8b4

13 files changed

Lines changed: 21 additions & 22 deletions

File tree

src/chunked/arrow_converter.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ use std::path::PathBuf;
4141
use std::str::from_utf8_unchecked;
4242
use std::sync::Arc;
4343

44+
use super::{ColumnBuilder, Converter, FnFindLastLineBreak, FnLineBreakLen};
45+
use crate::chunked;
4446
use crate::datatype::DataType;
4547
use crate::schema;
46-
use crate::chunked;
47-
use super::{ColumnBuilder, Converter, FnFindLastLineBreak, FnLineBreakLen};
4848

4949
pub(crate) struct Slice2Arrow<'a> {
5050
// pub(crate) file_out: File,
@@ -346,4 +346,4 @@ impl ColumnBuilder for HandlerBooleanBuilder {
346346
Arc::new(self.boolean_builder.finish()) as ArrayRef,
347347
)
348348
}
349-
}
349+
}

src/cli.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ use std::fs::File;
4040
use std::path::PathBuf;
4141

4242
#[cfg(feature = "rayon")]
43-
use crate::chunked::arrow_converter::{Slice2Arrow, MasterBuilders};
43+
use crate::chunked::arrow_converter::{MasterBuilders, Slice2Arrow};
4444
#[cfg(feature = "rayon")]
4545
use crate::chunked::converter::SampleSliceAggregator;
4646
#[cfg(feature = "rayon")]
47-
use crate::chunked::{Converter as ChunkedConverter, Slicer, find_last_nl, line_break_len_cr};
48-
#[cfg(feature = "rayon")]
4947
use crate::chunked::slicer::OldSlicer;
48+
#[cfg(feature = "rayon")]
49+
use crate::chunked::{find_last_nl, line_break_len_cr, Converter as ChunkedConverter, Slicer};
5050
use crate::converter::Converter;
5151
use crate::error::Result;
5252
use crate::mocker::Mocker;
@@ -265,7 +265,7 @@ impl Cli {
265265
.with_thread_channel_capacity(*thread_channel_capacity)
266266
.build()?
267267
.convert()?;
268-
},
268+
}
269269
#[cfg(feature = "rayon")]
270270
Commands::CConvert {
271271
converter,
@@ -295,7 +295,7 @@ impl Cli {
295295
masterbuilders: master_builders,
296296
});
297297
s2a
298-
},
298+
}
299299
Converters::None => {
300300
let _out_file = fs::OpenOptions::new()
301301
.create(true)
@@ -320,8 +320,7 @@ impl Cli {
320320
"Operation successful inbytes={} out bytes={} num of rows={}",
321321
stats.bytes_in, stats.bytes_out, stats.num_rows
322322
);
323-
324-
},
323+
}
325324
Commands::Mock {
326325
schema,
327326
out_file,
@@ -348,4 +347,4 @@ impl Cli {
348347

349348
Ok(())
350349
}
351-
}
350+
}

src/datatype.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ pub(crate) enum DataType {
4040
Int64,
4141
Utf8,
4242
LargeUtf8,
43-
}
43+
}

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ mod tests_error {
7575
SetupError.to_string(),
7676
);
7777
}
78-
}
78+
}

src/logger.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,4 +145,4 @@ pub(crate) fn try_init_logging() -> Result<(), SetLoggerError> {
145145
let logger = Logger::new(log_level);
146146
log::set_boxed_logger(Box::new(logger))
147147
.map(|()| log::set_max_level(log_level.to_level_filter()))
148-
}
148+
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ fn main() {
6767
Ok(_) => info!("All done! Bye. 👋🥳"),
6868
Err(e) => error!("{}", e),
6969
}
70-
}
70+
}

src/mocker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,4 +481,4 @@ fn master_thread_write(
481481

482482
info!("Master thread done, cleaning up resources.");
483483
Ok(())
484-
}
484+
}

src/mocking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ pub fn mock_integer(rng: &mut ThreadRng) -> String {
6767
/// Uniformly sample from ASCII characters and numbers to create a String with length `len`.
6868
pub fn mock_string(len: usize, rng: &mut ThreadRng) -> String {
6969
Alphanumeric.sample_string(rng, len)
70-
}
70+
}

src/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,4 @@ impl LargeUtf8Parser {
300300
Alignment::Center => text.trim_matches::<char>(self.trim_symbol.into()),
301301
}
302302
}
303-
}
303+
}

src/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,4 +365,4 @@ mod tests_schema {
365365

366366
let _schema: FixedSchema = FixedSchema::from_path(path).unwrap();
367367
}
368-
}
368+
}

0 commit comments

Comments
 (0)