Skip to content

Commit 012cc6d

Browse files
committed
Remove unnecessary clone in ascii.rs
1 parent 58dc0a0 commit 012cc6d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libstd/ascii.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -330,8 +330,7 @@ impl IntoStr for Vec<Ascii> {
330330
#[inline]
331331
fn into_string(self) -> String {
332332
unsafe {
333-
let s: &str = mem::transmute(self.as_slice());
334-
String::from_str(s)
333+
string::raw::from_utf8(self.into_bytes())
335334
}
336335
}
337336
}

0 commit comments

Comments
 (0)