We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79964b0 commit aa378b9Copy full SHA for aa378b9
vm/src/bytesinner.rs
@@ -252,13 +252,11 @@ impl PyBytesInner {
252
let mut res = String::with_capacity(self.elements.len());
253
for i in self.elements.iter() {
254
match i {
255
- 0..=8 => res.push_str(&format!("\\x0{}", i)),
256
9 => res.push_str("\\t"),
257
10 => res.push_str("\\n"),
258
- 11 => res.push_str(&format!("\\x0{:x}", i)),
259
13 => res.push_str("\\r"),
260
32..=126 => res.push(*(i) as char),
261
- _ => res.push_str(&format!("\\x{:x}", i)),
+ _ => res.push_str(&format!("\\x{:02x}", i)),
262
}
263
264
res
0 commit comments