Skip to content

Commit f2fe55b

Browse files
committed
rollup merge of rust-lang#18397 : aochagavia/ascii
2 parents b85780e + 012cc6d commit f2fe55b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/libstd/ascii.rs

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

0 commit comments

Comments
 (0)