Replacing str::unsafe_from_bytes with str::from_bytes (part 3)
This commit is contained in:
parent
64ce563c05
commit
eaa4befd6d
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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) }
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user