Replacing str::unsafe_from_bytes with str::from_bytes (part 3)

This commit is contained in:
Kevin Cantu 2012-01-25 01:07:05 -08:00
parent 64ce563c05
commit eaa4befd6d
2 changed files with 2 additions and 2 deletions

View File

@ -274,7 +274,7 @@ fn sanitize(s: str) -> str {
c != ' ' as u8 && c != '\t' as u8 && c != ';' as u8
{
let v = [c];
result += str::unsafe_from_bytes(v);
result += str::from_bytes(v);
}
}
}

View File

@ -122,7 +122,7 @@ fn ty_to_str(cx: ctxt, typ: t) -> str {
}
ty_var(v) { "<T" + int::str(v) + ">" }
ty_param(id, _) {
"'" + str::unsafe_from_bytes([('a' as u8) + (id as u8)])
"'" + str::from_bytes([('a' as u8) + (id as u8)])
}
_ { ty_to_short_str(cx, typ) }
}