From: Skgland Date: Thu, 30 Apr 2026 17:02:27 +0000 (+0200) Subject: use a function rather than a closure X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=327a677a7c3270bab0046bcabd8d60eebbcce178;p=scryer-prolog.git use a function rather than a closure --- 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.