diff --git a/cargo-dylint/tests/integration/dylint_driver_path.rs b/cargo-dylint/tests/integration/dylint_driver_path.rs index 6b5d11063..0f845bedc 100644 --- a/cargo-dylint/tests/integration/dylint_driver_path.rs +++ b/cargo-dylint/tests/integration/dylint_driver_path.rs @@ -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"), diff --git a/cargo-dylint/tests/integration/list.rs b/cargo-dylint/tests/integration/list.rs index 1792db83d..91f796d98 100644 --- a/cargo-dylint/tests/integration/list.rs +++ b/cargo-dylint/tests/integration/list.rs @@ -241,5 +241,4 @@ fn target_debug(path: &Path) -> Result { debug_dir .canonicalize() .with_context(|| format!("Could not canonicalize {debug_dir:?}")) - .map_err(Into::into) } diff --git a/driver/src/lib.rs b/driver/src/lib.rs index 006747598..cbfdc33b9 100644 --- a/driver/src/lib.rs +++ b/driver/src/lib.rs @@ -350,6 +350,7 @@ pub fn run>(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()) } @@ -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(()) }