Skip to content

Commit

Permalink
Remove unnecessary clone in ascii.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
aochagavia committed Oct 28, 2014
1 parent 58dc0a0 commit 012cc6d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libstd/ascii.rs
Expand Up @@ -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())
}
}
}
Expand Down

0 comments on commit 012cc6d

Please sign in to comment.