diff --git a/src/cargo/ops/resolve.rs b/src/cargo/ops/resolve.rs index 599518362cb..3105fbd8780 100644 --- a/src/cargo/ops/resolve.rs +++ b/src/cargo/ops/resolve.rs @@ -797,14 +797,14 @@ fn emit_warnings_of_unused_patches( { use std::fmt::Write; let mut msg = String::new(); - writeln!(&mut msg, "Patch `{}` {}", unused, MESSAGE)?; + writeln!(msg, "Patch `{}` {}", unused, MESSAGE)?; write!( - &mut msg, + msg, "Perhaps you misspell the source URL being patched.\n\ Possible URLs for `[patch.]`:", )?; for id in ids.iter() { - write!(&mut msg, "\n {}", id.display_registry_name())?; + write!(msg, "\n {}", id.display_registry_name())?; } ws.config().shell().warn(msg)?; }