1
Fork 0

libstd: Remove all uses of ~str from libstd

This commit is contained in:
Patrick Walton 2014-05-19 17:23:26 -07:00
parent a9dd903d79
commit 5633d4641f
30 changed files with 238 additions and 262 deletions

View file

@ -419,8 +419,8 @@ unsafe fn str_map_bytes(string: StrBuf, map: &'static [u8]) -> StrBuf {
#[inline]
unsafe fn str_copy_map_bytes(string: &str, map: &'static [u8]) -> StrBuf {
let mut s = string.to_owned();
for b in str::raw::as_owned_vec(&mut s).mut_iter() {
let mut s = string.to_strbuf();
for b in s.as_mut_bytes().mut_iter() {
*b = map[*b as uint];
}
s.into_strbuf()