diff --git a/format/desktop_entry/scan.ha b/format/desktop_entry/scan.ha index 38ae90b..b82effe 100644 --- a/format/desktop_entry/scan.ha +++ b/format/desktop_entry/scan.ha @@ -23,13 +23,9 @@ export fn scan(input: io::handle) scanner = scanner { // borrowed from the [[scanner]]. Use [[strings::dup]], [[entry_dup]], etc. to // retain a copy. If all you want is the file's data, use [[next_entry]]. export fn next(this: *scanner) (line | io::EOF | error) = { - let text = match (bufio::scan_line(&this.scanner)) { - case let text: const str => - yield text; - case let err: (io::error | utf8::invalid) => - return err; - case io::EOF => - return io::EOF; + let text = match (bufio::scan_line(&this.scanner)?) { + case let text: const str => yield text; + case io::EOF => return io::EOF; }; if (text == "") {