1
Fork 0

Rollup test fixes and rebase conflicts

This commit is contained in:
Alex Crichton 2015-01-02 09:24:56 -08:00
parent 1f2ead1629
commit e921e3f045
31 changed files with 56 additions and 95 deletions

View file

@ -402,7 +402,7 @@ fn escape_str(wr: &mut fmt::Writer, v: &str) -> fmt::Result {
}
fn escape_char(writer: &mut fmt::Writer, v: char) -> fmt::Result {
let mut buf = [0, .. 4];
let mut buf = [0; 4];
let n = v.encode_utf8(&mut buf).unwrap();
let buf = unsafe { str::from_utf8_unchecked(buf[0..n]) };
escape_str(writer, buf)