Skip to content

Commit

Permalink
Fix warnings generated by new clippy version.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Mar 2, 2021
1 parent 62c1709 commit 271b823
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/cache/gcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ impl GCSCredentialProvider {
}
}

#[allow(clippy::unnecessary_wraps)]
fn auth_request_jwt(
&self,
sa_key: &ServiceAccountKey,
Expand Down
1 change: 1 addition & 0 deletions src/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ fn run_server_process() -> Result<ServerStartup> {
}

#[cfg(not(windows))]
#[allow(clippy::unnecessary_wraps)]
fn redirect_stderr(f: File) -> Result<()> {
use libc::dup2;
use std::os::unix::io::IntoRawFd;
Expand Down
12 changes: 6 additions & 6 deletions src/compiler/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down Expand Up @@ -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());
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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());
Expand All @@ -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());
Expand Down Expand Up @@ -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());
Expand Down
1 change: 1 addition & 0 deletions src/compiler/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3063,6 +3063,7 @@ c:/foo/bar.rs:
.key
}

#[allow(clippy::unnecessary_wraps)]
fn nothing(_path: &Path) -> Result<()> {
Ok(())
}
Expand Down

0 comments on commit 271b823

Please sign in to comment.