mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-07 16:18:52 +00:00
Use or_else in the core library when it makes sense
This commit is contained in:
@@ -13,11 +13,7 @@ error_to_io_error :: proc(ferr: Error) -> io.Error {
|
||||
if ferr == nil {
|
||||
return .None;
|
||||
}
|
||||
err, ok := ferr.(io.Error);
|
||||
if !ok {
|
||||
err = .Unknown;
|
||||
}
|
||||
return err;
|
||||
return or_else(ferr.(io.Error), .Unknown);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user