Skip to content

Commit

Permalink
Fixed a spelling and some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hbina committed Aug 19, 2020
1 parent 51b6612 commit 4742843
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/bin/cargo/commands/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn extract_man(subcommand: &str, extension: &str) -> Option<Vec<u8>> {
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())
Expand Down
6 changes: 3 additions & 3 deletions src/bin/cargo/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<ProcessError>() {
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
Expand All @@ -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)
}
})
}
2 changes: 1 addition & 1 deletion src/cargo/ops/registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn publish(ws: &Workspace<'_>, opts: &PublishOpts<'_>) -> CargoResult<()> {
)?;
verify_dependencies(pkg, &registry, 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,
Expand Down

0 comments on commit 4742843

Please sign in to comment.