1
0
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:
Zed
2022-01-16 18:28:40 +01:00
parent 3d91ae0256
commit fff04de24b
4 changed files with 12 additions and 7 deletions

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