Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apply clippy suggestions #1209

Merged
merged 3 commits into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/cmd/frequency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl Args {
#[allow(unused_assignments)]
// amortize allocation
let mut field_work: Vec<u8> = Vec::with_capacity(100);
let mut row_work: csv::ByteRecord = Default::default();
let mut row_work: csv::ByteRecord = csv::ByteRecord::default();
let flag_no_nulls = self.flag_no_nulls;
for row in it {
row_work.clone_from(&row?);
Expand Down
2 changes: 1 addition & 1 deletion src/cmd/sqlp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ impl OutputMode {
};

match execute_inner() {
Ok(_) => Ok(df.shape()),
Ok(()) => Ok(df.shape()),
Err(e) => {
fail_clierror!("Failed to execute query: {query}: {e}")
},
Expand Down
1 change: 1 addition & 0 deletions src/cmd/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ use crate::{
util, CliResult,
};

#[allow(clippy::unsafe_derive_deserialize)]
#[derive(Clone, Deserialize, Debug)]
pub struct Args {
pub arg_input: Option<String>,
Expand Down
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ impl Config {
};
let mut wtr = io::BufWriter::with_capacity(DEFAULT_WTR_BUFFER_CAPACITY, idxfile);
match csv_index::RandomAccessSimple::create(&mut rdr, &mut wtr) {
Ok(_) => {
let Ok(_) = io::Write::flush(&mut wtr) else {
Ok(()) => {
let Ok(()) = io::Write::flush(&mut wtr) else {
return;
};
debug!("autoindex of {path_buf:?} successful.");
Expand Down