mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 06:53:01 +00:00
maintainers/scripts/sha-to-sri: minor efficiency improvement of the Nix32
decoder
This commit is contained in:
parent
011daf9161
commit
9259479c42
@ -59,8 +59,7 @@ class Nix32(Encoding):
|
||||
|
||||
def decode(self, s: str):
|
||||
assert len(s) == self.length
|
||||
out = [0 for _ in range(self.n)]
|
||||
# TODO: Do better than a list of byte-sized ints
|
||||
out = bytearray(self.n)
|
||||
|
||||
for n, c in enumerate(reversed(s)):
|
||||
digit = self.inverted[c]
|
||||
|
Loading…
Reference in New Issue
Block a user