mirror of
https://github.com/zedeus/nitter.git
synced 2026-01-29 14:52:50 -05:00
Simplify new error handling
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user