From 786910edd533b384150b88b1d23cb7fab0f1db0a Mon Sep 17 00:00:00 2001 From: Shun Sakai Date: Tue, 24 Dec 2024 10:15:44 +0900 Subject: [PATCH] chore: Remove `allow` --- examples/cat.rs | 1 - src/exit_code.rs | 1 - src/exit_code/convert.rs | 3 --- src/exit_code/fmt.rs | 6 ------ src/exit_code/result.rs | 1 - 5 files changed, 12 deletions(-) diff --git a/examples/cat.rs b/examples/cat.rs index 606def8..c1890b8 100644 --- a/examples/cat.rs +++ b/examples/cat.rs @@ -28,7 +28,6 @@ struct Opt { fn main() -> ExitCode { let opt = Opt::parse(); - #[allow(clippy::option_if_let_else)] let contents: io::Result> = if let Some(files) = opt.input { files.into_iter().map(fs::read_to_string).collect() } else { diff --git a/src/exit_code.rs b/src/exit_code.rs index bfcd120..1b25a2f 100644 --- a/src/exit_code.rs +++ b/src/exit_code.rs @@ -325,7 +325,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity, clippy::too_many_lines)] fn equality() { assert_eq!(ExitCode::Ok, ExitCode::Ok); assert_ne!(ExitCode::Ok, ExitCode::Usage); diff --git a/src/exit_code/convert.rs b/src/exit_code/convert.rs index a659722..e5f449e 100644 --- a/src/exit_code/convert.rs +++ b/src/exit_code/convert.rs @@ -633,7 +633,6 @@ mod tests { #[cfg(feature = "std")] #[test] - #[allow(clippy::too_many_lines)] fn from_io_error_to_exit_code() { use std::io::{Error, ErrorKind}; @@ -826,7 +825,6 @@ mod tests { #[cfg(feature = "std")] #[test] - #[allow(clippy::cognitive_complexity, clippy::too_many_lines)] fn from_io_error_kind_to_exit_code() { use std::io; @@ -983,7 +981,6 @@ mod tests { #[cfg(feature = "std")] #[cfg(any(unix, windows))] #[test] - #[allow(clippy::cognitive_complexity)] fn try_from_process_exit_status_to_exit_code() { assert_eq!( ExitCode::try_from(get_exit_status(0)).unwrap(), diff --git a/src/exit_code/fmt.rs b/src/exit_code/fmt.rs index 6ba3984..a9e80b7 100644 --- a/src/exit_code/fmt.rs +++ b/src/exit_code/fmt.rs @@ -173,7 +173,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity)] fn octal() { assert_eq!(format!("{:o}", ExitCode::Ok), "0"); assert_eq!(format!("{:#o}", ExitCode::Ok), "0o0"); @@ -242,7 +241,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity)] fn lower_hex() { assert_eq!(format!("{:x}", ExitCode::Ok), "0"); assert_eq!(format!("{:#x}", ExitCode::Ok), "0x0"); @@ -311,7 +309,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity)] fn upper_hex() { assert_eq!(format!("{:X}", ExitCode::Ok), "0"); assert_eq!(format!("{:#X}", ExitCode::Ok), "0x0"); @@ -380,7 +377,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity)] fn binary() { assert_eq!(format!("{:b}", ExitCode::Ok), "0"); assert_eq!(format!("{:#b}", ExitCode::Ok), "0b0"); @@ -449,7 +445,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity)] fn lower_exp() { assert_eq!(format!("{:e}", ExitCode::Ok), "0e0"); assert_eq!(format!("{:05e}", ExitCode::Ok), "000e0"); @@ -486,7 +481,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity)] fn upper_exp() { assert_eq!(format!("{:E}", ExitCode::Ok), "0E0"); assert_eq!(format!("{:05E}", ExitCode::Ok), "000E0"); diff --git a/src/exit_code/result.rs b/src/exit_code/result.rs index 3cae3d7..d557eaf 100644 --- a/src/exit_code/result.rs +++ b/src/exit_code/result.rs @@ -62,7 +62,6 @@ mod tests { } #[test] - #[allow(clippy::cognitive_complexity, clippy::too_many_lines)] fn from_result_type_to_exit_code() { assert_eq!(ExitCode::from(Ok::<(), ExitCode>(())), ExitCode::Ok); assert_eq!(ExitCode::from(Ok::(42)), ExitCode::Ok);