all: remove unnecessary IError() casts

This commit is contained in:
Alexander Medvednikov 2022-10-28 19:08:30 +03:00
parent daa2f90023
commit c6158e4519
28 changed files with 86 additions and 88 deletions

View file

@ -15,7 +15,7 @@ fn (mut s StringReader) read(mut buf []u8) !int {
eprintln('>>>> StringReader.read output buf.len: $buf.len')
}
if s.place > s.text.len + 1 {
return IError(io.Eof{})
return io.Eof{}
}
mut howmany := imin(buf.len, s.text.len - s.place)
xxx := s.text[s.place..s.place + howmany].bytes()