X Tutup
Skip to content

Commit 4b8e8a0

Browse files
committed
Make direct conversion from u8 to char
1 parent 341cd72 commit 4b8e8a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/src/encodings.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ pub mod latin_1 {
138138
) -> Result<(String, usize), E::Error> {
139139
let mut out = String::with_capacity(data.len());
140140
for i in data {
141-
out.push(char::from_u32(*i as u32).unwrap_or('\0'));
141+
out.push(*i as char);
142142
}
143143
let out_len = out.len();
144144
Ok((out, out_len))

0 commit comments

Comments
 (0)
X Tutup