diff options
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/ascii.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index c2e88bfdbcf..98445efafd2 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -330,8 +330,7 @@ impl IntoStr for Vec<Ascii> { #[inline] fn into_string(self) -> String { unsafe { - let s: &str = mem::transmute(self.as_slice()); - String::from_str(s) + string::raw::from_utf8(self.into_bytes()) } } } |
