diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-10-30 08:57:17 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-10-30 09:29:23 -0700 |
| commit | f2fe55b0139b0b6685d58723a1c44654e98b154b (patch) | |
| tree | 3aa58d9efbf1cb78214650ba0215ac605520d96b /src/libstd | |
| parent | b85780e7ea79b12e37541e5b4bd4c2a4133dff94 (diff) | |
| parent | 012cc6dd04f18d960e952991c2db929f3b1ff72f (diff) | |
| download | rust-f2fe55b0139b0b6685d58723a1c44654e98b154b.tar.gz rust-f2fe55b0139b0b6685d58723a1c44654e98b154b.zip | |
rollup merge of #18397 : aochagavia/ascii
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 33c8e94e32b..31f37a8a1bb 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -331,8 +331,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()) } } } |
