format::desktop_entry: Clean up next
This commit is contained in:
parent
bd5b9f5d75
commit
5ec91331d3
@ -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 == "") {
|
||||
|
Loading…
Reference in New Issue
Block a user