Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 643eb35

Browse filesBrowse files
committed
Make direct conversion from u8 to char
1 parent 9df04a9 commit 643eb35
Copy full SHA for 643eb35

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

‎common/src/encodings.rs

Copy file name to clipboardExpand all lines: common/src/encodings.rs
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.