about summary refs log tree commit diff
path: root/src/librustc_errors
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-11-23 18:36:33 -0800
committerEsteban Küber <esteban@kuber.com.ar>2019-11-23 18:45:18 -0800
commit9d7774c64fcbe9f535f649b51add9a701f459526 (patch)
treedbe8a6c9aacd51fd1ce2076f9c0d93f29bd5d5b9 /src/librustc_errors
parentd92355c1db65035e508020e746c141c79dfdbd99 (diff)
downloadrust-9d7774c64fcbe9f535f649b51add9a701f459526.tar.gz
rust-9d7774c64fcbe9f535f649b51add9a701f459526.zip
review comments: remove unnecessary `&str` to `String` conversions
Diffstat (limited to 'src/librustc_errors')
-rw-r--r--src/librustc_errors/diagnostic.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_errors/diagnostic.rs b/src/librustc_errors/diagnostic.rs
index 530844ceee1..abec979054e 100644
--- a/src/librustc_errors/diagnostic.rs
+++ b/src/librustc_errors/diagnostic.rs
@@ -54,9 +54,9 @@ impl DiagnosticStyledString {
     }
     pub fn push<S: Into<String>>(&mut self, t: S, highlight: bool) {
         if highlight {
-            self.0.push(StringPart::Highlighted(t.into()));
+            self.push_highlighted(t);
         } else {
-            self.0.push(StringPart::Normal(t.into()));
+            self.push_normal(t);
         }
     }
     pub fn normal<S: Into<String>>(t: S) -> DiagnosticStyledString {