From d492a446c519ea0083692d780be4a3e61c9f33e2 Mon Sep 17 00:00:00 2001 From: hi-rustin Date: Fri, 4 Feb 2022 10:46:44 +0800 Subject: [PATCH] Remove needless borrow Signed-off-by: hi-rustin --- src/cargo/ops/resolve.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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)?; }