mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
os: refactor err == IError(os.Eof{})
to err is os.Eof
This commit is contained in:
parent
ddc1a1fc08
commit
9bb1867be0
3 changed files with 4 additions and 4 deletions
|
@ -89,7 +89,7 @@ fn slurp_file_in_builder(fp &C.FILE) !strings.Builder {
|
|||
mut sb := strings.new_builder(os.buf_size)
|
||||
for {
|
||||
mut read_bytes := fread(&buf[0], 1, os.buf_size, fp) or {
|
||||
if err == IError(Eof{}) {
|
||||
if err is Eof {
|
||||
break
|
||||
}
|
||||
unsafe { sb.free() }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue