libcore: De-mode str
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user