Skip to content

Commit

Permalink
chore: clippy::needless_continue
Browse files Browse the repository at this point in the history
warning: this `continue` expression is redundant
    --> src/util.rs:2056:27
     |
2056 |                 Err(_) => continue,
     |                           ^^^^^^^^
     |
     = help: consider dropping the `continue` expression
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue
     = note: `-W clippy::needless-continue` implied by `-W clippy::pedantic`
     = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_continue)]`

warning: this `continue` expression is redundant
    --> src/util.rs:2213:27
     |
2213 |                 Err(_) => continue,
     |                           ^^^^^^^^
     |
     = help: consider dropping the `continue` expression
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_continue

[skip ci]
  • Loading branch information
jqnatividad committed Jan 12, 2025
1 parent 83fbab7 commit 3e8186c
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2051,9 +2051,8 @@ pub fn get_stats_records(
break;
}
s_slice = curr_line.as_bytes().to_vec();
match simd_json::serde::from_slice(&mut s_slice) {
Ok(stats) => csv_stats.push(stats),
Err(_) => continue,
if let Ok(stats) = simd_json::serde::from_slice(&mut s_slice) {
csv_stats.push(stats)
}
}
stats_data_loaded = !csv_stats.is_empty();
Expand Down Expand Up @@ -2208,9 +2207,8 @@ pub fn get_stats_records(
break;
}
s_slice = curr_line.as_bytes().to_vec();
match simd_json::serde::from_slice(&mut s_slice) {
Ok(stats) => csv_stats.push(stats),
Err(_) => continue,
if let Ok(stats) = simd_json::serde::from_slice(&mut s_slice) {
csv_stats.push(stats)
}
}
};
Expand Down

0 comments on commit 3e8186c

Please sign in to comment.