From ede1f7d2a5a2f4038e3f3b2e953c44ee5ea06194 Mon Sep 17 00:00:00 2001 From: Matthias Krüger Date: Thu, 23 Aug 2018 10:14:52 +0200 Subject: use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into() --- src/librustc_errors/emitter.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/librustc_errors') diff --git a/src/librustc_errors/emitter.rs b/src/librustc_errors/emitter.rs index b4034a6a529..c08cf3d039d 100644 --- a/src/librustc_errors/emitter.rs +++ b/src/librustc_errors/emitter.rs @@ -798,7 +798,7 @@ impl EmitterWriter { // at by "in this macro invocation" format!(" (#{})", i + 1) } else { - "".to_string() + String::new() }))); } // Check to make sure we're not in any <*macros> @@ -813,7 +813,7 @@ impl EmitterWriter { // backtrace is multiple levels deep format!(" (#{})", i + 1) } else { - "".to_string() + String::new() }))); if !always_backtrace { break; @@ -1065,7 +1065,7 @@ impl EmitterWriter { let col = if let Some(first_annotation) = first_line.annotations.first() { format!(":{}", first_annotation.start_col + 1) } else { - "".to_string() + String::new() }; format!("{}:{}{}", annotated_file.file.name, -- cgit 1.4.1-3-g733a5