Skip to content

Commit 868a1cf

Browse files
committed
Auto merge of #8637 - hbina:spelling_and_clippy, r=alexcrichton
Fixed a spelling and some clippy warnings
2 parents 51b6612 + 4742843 commit 868a1cf

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/bin/cargo/commands/help.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ fn extract_man(subcommand: &str, extension: &str) -> Option<Vec<u8>> {
120120
fn write_and_spawn(contents: &[u8], command: &str) -> CargoResult<()> {
121121
let mut tmp = tempfile::Builder::new().prefix("cargo-man").tempfile()?;
122122
let f = tmp.as_file_mut();
123-
f.write_all(&contents)?;
123+
f.write_all(contents)?;
124124
f.flush()?;
125125
let mut cmd = std::process::Command::new(command)
126126
.arg(tmp.path())

src/bin/cargo/commands/run.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
7272
ops::run(&ws, &compile_opts, &values_os(args, "args")).map_err(|err| {
7373
let proc_err = match err.downcast_ref::<ProcessError>() {
7474
Some(e) => e,
75-
None => return CliError::new(err.into(), 101),
75+
None => return CliError::new(err, 101),
7676
};
7777

7878
// If we never actually spawned the process then that sounds pretty
7979
// bad and we always want to forward that up.
8080
let exit = match proc_err.exit {
8181
Some(exit) => exit,
82-
None => return CliError::new(err.into(), 101),
82+
None => return CliError::new(err, 101),
8383
};
8484

8585
// If `-q` was passed then we suppress extra error information about
@@ -90,7 +90,7 @@ pub fn exec(config: &mut Config, args: &ArgMatches<'_>) -> CliResult {
9090
if is_quiet {
9191
CliError::code(exit_code)
9292
} else {
93-
CliError::new(err.into(), exit_code)
93+
CliError::new(err, exit_code)
9494
}
9595
})
9696
}

src/cargo/ops/registry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> {
9393
)?;
9494
verify_dependencies(pkg, &registry, reg_id)?;
9595

96-
// Prepare a tarball, with a non-surpressable warning if metadata
96+
// Prepare a tarball, with a non-suppressible warning if metadata
9797
// is missing since this is being put online.
9898
let tarball = ops::package(
9999
ws,

0 commit comments

Comments
 (0)