Remove use of if-catch-case

This commit is contained in:
Christoffer Lerno
2025-03-07 13:57:05 +01:00
parent cce097fdef
commit facaa75083
2 changed files with 14 additions and 10 deletions

View File

@@ -225,11 +225,12 @@ fn char! read_next(JsonContext* context) @local
char! c = context.stream.read_byte();
if (catch err = c)
{
case IoError.EOF:
if (err == IoError.EOF)
{
context.reached_end = true;
return '\0';
default:
return err?;
}
return err?;
}
if (c == 0)
{