Skip to content

Commit

Permalink
clippy: suppress cognitive_complexity lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cakebaker committed Oct 13, 2023
1 parent 4d3d720 commit f0a3398
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/uu/dd/src/numbers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ mod tests {
}

#[test]
#[allow(clippy::cognitive_complexity)]
fn test_to_magnitude_and_suffix_not_powers_of_1024() {
assert_eq!(to_magnitude_and_suffix(1, SuffixType::Si), "1.0 B");
assert_eq!(to_magnitude_and_suffix(999, SuffixType::Si), "999 B");
Expand Down
1 change: 1 addition & 0 deletions src/uu/dd/src/parseargs/unit_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ fn test_status_level_none() {
}

#[test]
#[allow(clippy::cognitive_complexity)]
fn test_all_top_level_args_no_leading_dashes() {
let args = &[
"if=foo.file",
Expand Down
1 change: 1 addition & 0 deletions src/uu/od/src/prn_float.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ fn test_format_flo64() {
}

#[test]
#[allow(clippy::cognitive_complexity)]
fn test_format_flo16() {
assert_eq!(format_flo16(f16::from_bits(0x8400u16)), "-6.104e-5");
assert_eq!(format_flo16(f16::from_bits(0x8401u16)), "-6.109e-5");
Expand Down
2 changes: 2 additions & 0 deletions src/uu/seq/src/numberparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ mod tests {
}

#[test]
#[allow(clippy::cognitive_complexity)]
fn test_num_integral_digits() {
// no decimal, no exponent
assert_eq!(num_integral_digits("123"), 3);
Expand Down Expand Up @@ -578,6 +579,7 @@ mod tests {
}

#[test]
#[allow(clippy::cognitive_complexity)]
fn test_num_fractional_digits() {
// no decimal, no exponent
assert_eq!(num_fractional_digits("123"), 0);
Expand Down
1 change: 1 addition & 0 deletions src/uu/stat/src/stat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -947,6 +947,7 @@ mod tests {
}

#[test]
#[allow(clippy::cognitive_complexity)]
fn test_group_num() {
assert_eq!("12,379,821,234", group_num("12379821234"));
assert_eq!("21,234", group_num("21234"));
Expand Down

0 comments on commit f0a3398

Please sign in to comment.