replaces pairs with keys and items; saves 8 bytes (#21319)

replace `pairs` with `keys` and `items`
This commit is contained in:
ringabout 2023-02-03 02:11:20 +08:00 • committed by GitHub
commit 8e53fba083
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View file

@ -25,7 +25,7 @@ proc undefSymbol*(symbols: StringTableRef; symbol: string) =
# result = if isDefined(symbol): gSymbols[symbol] else: nil
iterator definedSymbolNames*(symbols: StringTableRef): string =
for key, val in pairs(symbols):
for key in keys(symbols):
yield key
proc countDefinedSymbols*(symbols: StringTableRef): int =