Simplify new error handling

This commit is contained in:
Zed
2022-01-16 18:28:40 +01:00
parent 3d91ae0256
commit fff04de24b
4 changed files with 12 additions and 7 deletions
+5
View File
@@ -13,3 +13,8 @@ type
Errors* = object
errors*: seq[ErrorObj]
proc contains*(codes: set[Error]; errors: Errors): bool =
for e in errors.errors:
if e.code in codes:
return true