mirror of
https://github.com/rust-lang/cargo.git
synced 2025-09-28 11:20:36 +00:00
Fixed a spelling and some clippy warnings
This commit is contained in:
parent
51b66125ba
commit
47428433d4
@ -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())
|
||||
|
@ -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
|
||||
@ -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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user