Skip to content

Commit

Permalink
Merge pull request #1209 from jqnatividad/clippy-suggestions
Browse files Browse the repository at this point in the history
apply clippy suggestions
  • Loading branch information
jqnatividad authored Aug 12, 2023
2 parents 41c2bc5 + 0e3ad0c commit 3eae5b1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
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

0 comments on commit 3eae5b1

Please sign in to comment.