mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-01 04:10:07 +00:00
Convert core:compress and core:image error checks to new union comparison.
No more need for `is_kind(err, Error_Value)`, just test err == Error_Value.
This commit is contained in:
@@ -35,7 +35,7 @@ main :: proc() {
|
||||
if len(args) < 2 {
|
||||
stderr("No input file specified.\n");
|
||||
err := gzip.load(TEST, &buf);
|
||||
if gzip.is_kind(err, gzip.E_General.OK) {
|
||||
if err != E_General.OK {
|
||||
stdout("Displaying test vector: ");
|
||||
stdout(bytes.buffer_to_string(&buf));
|
||||
stdout("\n");
|
||||
@@ -54,8 +54,8 @@ main :: proc() {
|
||||
} else {
|
||||
err = gzip.load(file, &buf);
|
||||
}
|
||||
if !gzip.is_kind(err, gzip.E_General.OK) {
|
||||
if gzip.is_kind(err, gzip.E_General.File_Not_Found) {
|
||||
if err != gzip.E_General.OK {
|
||||
if err != E_General.File_Not_Found {
|
||||
stderr("File not found: ");
|
||||
stderr(file);
|
||||
stderr("\n");
|
||||
|
||||
Reference in New Issue
Block a user