Making it harder to swallow `error.Canceled`

Did you notice r.mode = .failure; line? You could only get there if you run into the SeekError earlier. You would return file_reader.err orelse file_reader.seek_err.? then. I did not do that because my example did not involve seeking.

I want my program to crash if I ever make incorrect assumptions. I like safety checks.

return stdin.err orelse error.Unexpected; or do not use any library that you do not trust.

2 Likes