Skip to content

Commit

Permalink
Make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
smoelius committed Jan 20, 2025
1 parent 0c63c92 commit caeed86
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cargo-dylint/tests/integration/dylint_driver_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn dylint_driver_path() {
// smoelius: Verify that the driver can be run directly.
// https://github.com/trailofbits/dylint/issues/54
let toolchain_path = toolchain_path(tempdir.path()).unwrap();
let toolchain = toolchain_path.iter().last().unwrap();
let toolchain = toolchain_path.iter().next_back().unwrap();
let mut command = dylint_driver(
&toolchain.to_string_lossy(),
&dylint_driver_path.join(toolchain).join("dylint-driver"),
Expand Down
1 change: 0 additions & 1 deletion cargo-dylint/tests/integration/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -241,5 +241,4 @@ fn target_debug(path: &Path) -> Result<PathBuf> {
debug_dir
.canonicalize()
.with_context(|| format!("Could not canonicalize {debug_dir:?}"))
.map_err(Into::into)
}
4 changes: 3 additions & 1 deletion driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ pub fn run<T: AsRef<OsStr>>(args: &[T]) -> Result<()> {
// of the log messages.
log::debug!("{:?}", rustc_args);

#[allow(clippy::unit_arg)]
map_run_compiler_err(rustc_driver::RunCompiler::new(&rustc_args, &mut callbacks).run())
}

Expand Down Expand Up @@ -426,7 +427,8 @@ fn map_run_compiler_err(result: Result<(), rustc_span::ErrorGuaranteed>) -> Resu
}

#[rustversion::since(2024-12-09)]
fn map_run_compiler_err((): ()) -> Result<()> {
#[allow(clippy::unnecessary_wraps)]
const fn map_run_compiler_err((): ()) -> Result<()> {
Ok(())
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ fn send_request(api_key: &str, request: &openai::Request) -> Result<openai::Resp
.map_err(IoError::from)
.and_then(|data| {
debug("request", &data);
send(api_key, &data).map_err(IoError::from)
send(api_key, &data)
})
.and_then(|(code, data)| {
debug("response", &data);
Expand Down

0 comments on commit caeed86

Please sign in to comment.