]> Repositorios git - scryer-prolog.git/commitdiff
use a function rather than a closure
authorSkgland <[email protected]>
Thu, 30 Apr 2026 17:02:27 +0000 (19:02 +0200)
committerSkgland <[email protected]>
Thu, 30 Apr 2026 17:02:27 +0000 (19:02 +0200)
src/parser/char_reader.rs

index caffc7c1d20c52fba4184291d21bc116cc65d238..334a75f5bd1939eeb303fe55be7d59b970864ec1 100644 (file)
@@ -135,7 +135,7 @@ impl<R: Read> CharRead for CharReader<R> {
             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.