Make or_else and or_return operators (binary and suffix respectively)

This commit is contained in:
gingerBill committed 2021-08-15 17:14:35 +01:00
1 parent a3a20f09e2
commit 21cbac755e
16 files changed
+247 -195

No files matched your search

+1 -1
View File
@@ -13,7 +13,7 @@ error_to_io_error :: proc(ferr: Error) -> io.Error {
if ferr == nil {
return .None;
}
return or_else(ferr.(io.Error), .Unknown);
return ferr.(io.Error) or_else .Unknown;
}