mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-29 20:46:07 +03:00
codegen_llvm_back: simplify a conversion to char
This commit is contained in:
@@ -806,7 +806,7 @@ fn escape_string(s: &[u8]) -> String {
|
||||
let mut x = "Non-UTF-8 output: ".to_string();
|
||||
x.extend(s.iter()
|
||||
.flat_map(|&b| ascii::escape_default(b))
|
||||
.map(|b| char::from_u32(b as u32).unwrap()));
|
||||
.map(char::from));
|
||||
x
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user