libcore: De-mode str

This commit is contained in:
Patrick Walton
2012-09-21 18:36:32 -07:00
parent 49af969e2c
commit d48396c986
19 changed files with 182 additions and 159 deletions

View File

@@ -548,10 +548,10 @@ fn sanitize(s: ~str) -> ~str {
'a' .. 'z'
| 'A' .. 'Z'
| '0' .. '9'
| '_' => str::push_char(result,c),
| '_' => str::push_char(&mut result, c),
_ => {
if c > 'z' && char::is_XID_continue(c) {
str::push_char(result,c);
str::push_char(&mut result, c);
}
}
}

View File

@@ -1175,7 +1175,7 @@ fn encode_metadata(parms: encode_parms, crate: @crate) -> ~[u8] {
//
// vec::from_slice(metadata_encoding_version) +
(do str::as_bytes(~"rust\x00\x00\x00\x01") |bytes| {
(do str::as_bytes(&~"rust\x00\x00\x00\x01") |bytes| {
vec::slice(bytes, 0, 8)
}) + flate::deflate_bytes(wr.buf.check_out(|buf| buf))
}