]> git.lizzy.rs Git - rust.git/blobdiff - src/visitor.rs
Change `to_string` to `to_owned` when it just creates a `String` from a `&str`
[rust.git] / src / visitor.rs
index 75dcdb12601d3abbf732417b0130f569f43bb06b..7a9c8583039b0f141fbbc6a048106420af3e76c0 100644 (file)
@@ -223,7 +223,7 @@ pub fn snippet(&self, span: Span) -> String {
                 println!("Couldn't make snippet for span {:?}->{:?}",
                          self.codemap.lookup_char_pos(span.lo),
                          self.codemap.lookup_char_pos(span.hi));
-                "".to_string()
+                "".to_owned()
             }
         }
     }