core: Convert Char::escape_default, escape_unicode to iterators
[breaking-change]
This commit is contained in:
parent
ca1820b1fc
commit
aad2461604
7 changed files with 110 additions and 43 deletions
|
@ -2033,9 +2033,9 @@ fn lit_to_string(lit: &ast::Lit) -> String {
|
|||
ast::LitBinary(ref data) => format!("{}", data),
|
||||
ast::LitByte(b) => {
|
||||
let mut res = String::from_str("b'");
|
||||
(b as char).escape_default(|c| {
|
||||
for c in (b as char).escape_default() {
|
||||
res.push(c);
|
||||
});
|
||||
}
|
||||
res.push('\'');
|
||||
res
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue