diff --git a/src/cache/cache.rs b/src/cache/cache.rs index 03cbe9376..faf205162 100644 --- a/src/cache/cache.rs +++ b/src/cache/cache.rs @@ -47,6 +47,7 @@ fn get_file_mode(file: &fs::File) -> Result> { } #[cfg(windows)] +#[allow(clippy::unnecessary_wraps)] fn get_file_mode(_file: &fs::File) -> Result> { Ok(None) } @@ -61,6 +62,7 @@ fn set_file_mode(path: &Path, mode: u32) -> Result<()> { } #[cfg(windows)] +#[allow(clippy::unnecessary_wraps)] fn set_file_mode(_path: &Path, _mode: u32) -> Result<()> { Ok(()) } diff --git a/src/cache/gcs.rs b/src/cache/gcs.rs index 215f103af..4a8046c83 100644 --- a/src/cache/gcs.rs +++ b/src/cache/gcs.rs @@ -338,6 +338,7 @@ impl GCSCredentialProvider { } } + #[allow(clippy::unnecessary_wraps)] fn auth_request_jwt( &self, sa_key: &ServiceAccountKey, diff --git a/src/commands.rs b/src/commands.rs index d8fe3a232..28a6ba984 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -112,6 +112,7 @@ fn run_server_process() -> Result { } #[cfg(not(windows))] +#[allow(clippy::unnecessary_wraps)] fn redirect_stderr(f: File) -> Result<()> { use libc::dup2; use std::os::unix::io::IntoRawFd; @@ -123,6 +124,7 @@ fn redirect_stderr(f: File) -> Result<()> { } #[cfg(windows)] +#[allow(clippy::unnecessary_wraps)] fn redirect_stderr(f: File) -> Result<()> { use std::os::windows::io::IntoRawHandle; use winapi::um::processenv::SetStdHandle; diff --git a/src/compiler/compiler.rs b/src/compiler/compiler.rs index 91e72f281..4e3be3e01 100644 --- a/src/compiler/compiler.rs +++ b/src/compiler/compiler.rs @@ -1453,7 +1453,7 @@ LLVM version: 6.0", // wait on cache write future so we don't race with it! f.wait().unwrap(); } - _ => assert!(false, "Unexpected compile result: {:?}", cached), + _ => panic!("Unexpected compile result: {:?}", cached), } assert_eq!(exit_status(0), res.status); assert_eq!(COMPILER_STDOUT, res.stdout.as_slice()); @@ -1554,7 +1554,7 @@ LLVM version: 6.0", // wait on cache write future so we don't race with it! f.wait().unwrap(); } - _ => assert!(false, "Unexpected compile result: {:?}", cached), + _ => panic!("Unexpected compile result: {:?}", cached), } assert_eq!(exit_status(0), res.status); assert_eq!(COMPILER_STDOUT, res.stdout.as_slice()); @@ -1662,7 +1662,7 @@ LLVM version: 6.0", // wait on cache write future so we don't race with it! f.wait().unwrap(); } - _ => assert!(false, "Unexpected compile result: {:?}", cached), + _ => panic!("Unexpected compile result: {:?}", cached), } assert_eq!(exit_status(0), res.status); @@ -1744,7 +1744,7 @@ LLVM version: 6.0", // wait on cache write future so we don't race with it! f.wait().unwrap(); } - _ => assert!(false, "Unexpected compile result: {:?}", cached), + _ => panic!("Unexpected compile result: {:?}", cached), } assert_eq!(exit_status(0), res.status); assert_eq!(COMPILER_STDOUT, res.stdout.as_slice()); @@ -1771,7 +1771,7 @@ LLVM version: 6.0", // wait on cache write future so we don't race with it! f.wait().unwrap(); } - _ => assert!(false, "Unexpected compile result: {:?}", cached), + _ => panic!("Unexpected compile result: {:?}", cached), } assert_eq!(exit_status(0), res.status); assert_eq!(COMPILER_STDOUT, res.stdout.as_slice()); @@ -1932,7 +1932,7 @@ LLVM version: 6.0", // wait on cache write future so we don't race with it! f.wait().unwrap(); } - _ => assert!(false, "Unexpected compile result: {:?}", cached), + _ => panic!("Unexpected compile result: {:?}", cached), } assert_eq!(exit_status(0), res.status); assert_eq!(COMPILER_STDOUT, res.stdout.as_slice()); diff --git a/src/compiler/rust.rs b/src/compiler/rust.rs index ad316cdb8..a930ba6d7 100644 --- a/src/compiler/rust.rs +++ b/src/compiler/rust.rs @@ -3063,6 +3063,7 @@ c:/foo/bar.rs: .key } + #[allow(clippy::unnecessary_wraps)] fn nothing(_path: &Path) -> Result<()> { Ok(()) }