syntax: Replace String::from_str with the stable String::from

This commit is contained in:
Erick Tryzelaar
2015-04-16 21:19:50 -07:00
parent 8553658952
commit 2937cce70c
7 changed files with 9 additions and 9 deletions

View File

@@ -557,9 +557,9 @@ impl CodeMap {
// FIXME #12884: no efficient/safe way to remove from the start of a string
// and reuse the allocation.
let mut src = if src.starts_with("\u{feff}") {
String::from_str(&src[3..])
String::from(&src[3..])
} else {
String::from_str(&src[..])
String::from(&src[..])
};
// Append '\n' in case it's not already there.