diff options
author | Matthias Krüger <matthias.krueger@famsik.de> | 2018-08-23 10:14:52 +0200 |
---|---|---|
committer | Matthias Krüger <matthias.krueger@famsik.de> | 2018-08-23 10:14:52 +0200 |
commit | ede1f7d2a5a2f4038e3f3b2e953c44ee5ea06194 (patch) | |
tree | cdaa95ead9a05ae228478333ccd15b88ac115ea7 /src/librustc_errors | |
parent | e73077e10603b3586828f2d3d067f804c2fc0a1f (diff) | |
download | rust-ede1f7d2a5a2f4038e3f3b2e953c44ee5ea06194.tar.gz |
use String::new() instead of String::from(""), "".to_string(), "".to_owned() or "".into()
Diffstat (limited to 'src/librustc_errors')
-rw-r--r-- | src/librustc_errors/emitter.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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, |