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 7001945 commit 0bc783aCopy full SHA for 0bc783a
src/event/data.rs
@@ -91,9 +91,7 @@ impl fmt::Display for Data {
91
Err(e) => {
92
let (good, bad) = slice.split_at(e.valid_up_to());
93
94
- // SAFETY: good is a valid utf8 sequency
95
- f.write_str(unsafe { str::from_utf8_unchecked(good) })?;
96
-
+ f.write_str(str::from_utf8(good).unwrap())?;
97
write!(f, "\\x{:02X}", bad[0])?;
98
slice = &bad[1..];
99
}
0 commit comments