diff --git a/src/parser/char_reader.rs b/src/parser/char_reader.rs index caffc7c1..334a75f5 100644 --- a/src/parser/char_reader.rs +++ b/src/parser/char_reader.rs @@ -135,7 +135,7 @@ impl CharRead for CharReader { Err(e) => return Some(Err(e)), } - let bad_bytes_error = |buf: &[u8]| { + fn bad_bytes_error(buf: &[u8]) -> std::io::Error { // If we have 4 bytes that still don't make up // a valid code point, then we have garbage.