diff --git a/src/uu/csplit/src/csplit.rs b/src/uu/csplit/src/csplit.rs index 6c9a776c38..6e03c2e5c8 100644 --- a/src/uu/csplit/src/csplit.rs +++ b/src/uu/csplit/src/csplit.rs @@ -664,6 +664,7 @@ mod tests { use super::*; #[test] + #[allow(clippy::cognitive_complexity)] fn input_splitter() { let input = vec![ Ok(String::from("aaa")), @@ -736,6 +737,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn input_splitter_interrupt_rewind() { let input = vec![ Ok(String::from("aaa")), diff --git a/src/uu/csplit/src/patterns.rs b/src/uu/csplit/src/patterns.rs index fd96fd9fb9..8e7b76e6bb 100644 --- a/src/uu/csplit/src/patterns.rs +++ b/src/uu/csplit/src/patterns.rs @@ -211,6 +211,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn up_to_match_pattern() { let input: Vec = vec![ "/test1.*end$/", @@ -264,6 +265,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn skip_to_match_pattern() { let input: Vec = vec![ "%test1.*end$%", diff --git a/src/uu/dd/src/numbers.rs b/src/uu/dd/src/numbers.rs index 2911f7e58c..8a6fa5a7a3 100644 --- a/src/uu/dd/src/numbers.rs +++ b/src/uu/dd/src/numbers.rs @@ -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"); diff --git a/src/uu/dd/src/parseargs/unit_tests.rs b/src/uu/dd/src/parseargs/unit_tests.rs index a190fd75bd..142e49fd0b 100644 --- a/src/uu/dd/src/parseargs/unit_tests.rs +++ b/src/uu/dd/src/parseargs/unit_tests.rs @@ -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", diff --git a/src/uu/df/src/blocks.rs b/src/uu/df/src/blocks.rs index 9bc16b7820..fad8f7ac0c 100644 --- a/src/uu/df/src/blocks.rs +++ b/src/uu/df/src/blocks.rs @@ -239,6 +239,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), "1B"); assert_eq!(to_magnitude_and_suffix(999, SuffixType::Si), "999B"); diff --git a/src/uu/head/src/head.rs b/src/uu/head/src/head.rs index d6e4db5a78..c533f5a5df 100644 --- a/src/uu/head/src/head.rs +++ b/src/uu/head/src/head.rs @@ -548,6 +548,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn all_args_test() { assert!(options("--silent").unwrap().quiet); assert!(options("--quiet").unwrap().quiet); diff --git a/src/uu/head/src/parse.rs b/src/uu/head/src/parse.rs index 7f7dd48f8c..062a1844ce 100644 --- a/src/uu/head/src/parse.rs +++ b/src/uu/head/src/parse.rs @@ -153,6 +153,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn test_parse_numbers_obsolete() { assert_eq!(obsolete("-5"), obsolete_result(&["-n", "5"])); assert_eq!(obsolete("-100"), obsolete_result(&["-n", "100"])); diff --git a/src/uu/nl/src/nl.rs b/src/uu/nl/src/nl.rs index 71b4aac288..61ca8406f1 100644 --- a/src/uu/nl/src/nl.rs +++ b/src/uu/nl/src/nl.rs @@ -394,6 +394,7 @@ mod test { use super::*; #[test] + #[allow(clippy::cognitive_complexity)] fn test_format() { assert_eq!(NumberFormat::Left.format(12, 1), "12"); assert_eq!(NumberFormat::Left.format(-12, 1), "-12"); diff --git a/src/uu/numfmt/src/format.rs b/src/uu/numfmt/src/format.rs index 08bb0c2e77..034d900e92 100644 --- a/src/uu/numfmt/src/format.rs +++ b/src/uu/numfmt/src/format.rs @@ -430,6 +430,7 @@ mod tests { use super::*; #[test] + #[allow(clippy::cognitive_complexity)] fn test_round_with_precision() { let rm = RoundMethod::FromZero; assert_eq!(1.0, round_with_precision(0.12345, rm, 0)); diff --git a/src/uu/numfmt/src/options.rs b/src/uu/numfmt/src/options.rs index 07b364f18d..88e64e963e 100644 --- a/src/uu/numfmt/src/options.rs +++ b/src/uu/numfmt/src/options.rs @@ -266,6 +266,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn test_parse_format_with_invalid_formats() { assert!("".parse::().is_err()); assert!("hello".parse::().is_err()); diff --git a/src/uu/od/src/prn_float.rs b/src/uu/od/src/prn_float.rs index f4d018bd84..f44abf7c41 100644 --- a/src/uu/od/src/prn_float.rs +++ b/src/uu/od/src/prn_float.rs @@ -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"); diff --git a/src/uu/seq/src/numberparse.rs b/src/uu/seq/src/numberparse.rs index 4699172554..3f4b213955 100644 --- a/src/uu/seq/src/numberparse.rs +++ b/src/uu/seq/src/numberparse.rs @@ -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); @@ -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); diff --git a/src/uu/split/src/number.rs b/src/uu/split/src/number.rs index 39d64f9272..a01701c80e 100644 --- a/src/uu/split/src/number.rs +++ b/src/uu/split/src/number.rs @@ -398,6 +398,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn test_dynamic_width_number_display_alphabetic() { fn num(n: usize) -> Number { let mut number = Number::DynamicWidth(DynamicWidthNumber::new(26, 0)); @@ -443,6 +444,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn test_dynamic_width_number_display_numeric_hexadecimal() { fn num(n: usize) -> Number { let mut number = Number::DynamicWidth(DynamicWidthNumber::new(16, 0)); @@ -467,6 +469,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn test_fixed_width_number_increment() { let mut n = Number::FixedWidth(FixedWidthNumber::new(3, 2, 0).unwrap()); assert_eq!(n.digits(), vec![0, 0]); @@ -490,6 +493,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn test_fixed_width_number_display_alphabetic() { fn num(n: usize) -> Result { let mut number = Number::FixedWidth(FixedWidthNumber::new(26, 2, 0).unwrap()); diff --git a/src/uu/split/src/split.rs b/src/uu/split/src/split.rs index 020ada93bb..84b5900cc2 100644 --- a/src/uu/split/src/split.rs +++ b/src/uu/split/src/split.rs @@ -1846,6 +1846,7 @@ mod tests { } #[test] + #[allow(clippy::cognitive_complexity)] fn test_number_type_from_error() { assert_eq!( NumberType::from("xyz").unwrap_err(), diff --git a/src/uu/stat/src/stat.rs b/src/uu/stat/src/stat.rs index 055393578e..7d1fd574c2 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -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"));