diff --git a/src/bin/cargo/commands/help.rs b/src/bin/cargo/commands/help.rs index ae275d5a5e2..4871fa530e9 100644 --- a/src/bin/cargo/commands/help.rs +++ b/src/bin/cargo/commands/help.rs @@ -120,7 +120,7 @@ fn extract_man(subcommand: &str, extension: &str) -> Option> { fn write_and_spawn(contents: &[u8], command: &str) -> CargoResult<()> { let mut tmp = tempfile::Builder::new().prefix("cargo-man").tempfile()?; let f = tmp.as_file_mut(); - f.write_all(&contents)?; + f.write_all(contents)?; f.flush()?; let mut cmd = std::process::Command::new(command) .arg(tmp.path()) diff --git a/src/bin/cargo/commands/run.rs b/src/bin/cargo/commands/run.rs index a5e7c2c0295..d16bfd31f3c 100644 --- a/src/bin/cargo/commands/run.rs +++ b/src/bin/cargo/commands/run.rs @@ -72,14 +72,14 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { ops::run(&ws, &compile_opts, &values_os(args, "args")).map_err(|err| { let proc_err = match err.downcast_ref::() { Some(e) => e, - None => return CliError::new(err.into(), 101), + None => return CliError::new(err, 101), }; // If we never actually spawned the process then that sounds pretty // bad and we always want to forward that up. let exit = match proc_err.exit { Some(exit) => exit, - None => return CliError::new(err.into(), 101), + None => return CliError::new(err, 101), }; // If `-q` was passed then we suppress extra error information about @@ -90,7 +90,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult { if is_quiet { CliError::code(exit_code) } else { - CliError::new(err.into(), exit_code) + CliError::new(err, exit_code) } }) } diff --git a/src/cargo/ops/registry.rs b/src/cargo/ops/registry.rs index 438af777cdf..abdce2267e1 100644 --- a/src/cargo/ops/registry.rs +++ b/src/cargo/ops/registry.rs @@ -93,7 +93,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> { )?; verify_dependencies(pkg, ®istry, reg_id)?; - // Prepare a tarball, with a non-surpressable warning if metadata + // Prepare a tarball, with a non-suppressible warning if metadata // is missing since this is being put online. let tarball = ops::package( ws,