We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d114694 commit 52713a4Copy full SHA for 52713a4
library/std/src/sys/windows/stdio.rs
@@ -128,7 +128,7 @@ fn write(
128
let utf8 = match str::from_utf8(&data[..len]) {
129
Ok(s) => s,
130
Err(ref e) if e.valid_up_to() == 0 => {
131
- first_byte_char_width = utf8_char_width(data[0]);
+ let first_byte_char_width = utf8_char_width(data[0]);
132
if first_byte_char_width > 1 && data.len() < first_byte_char_width {
133
incomplete_utf8.bytes[0] = data[0];
134
incomplete_utf8.len = 1;
0 commit comments