Add BitSeq.isZeros
This commit is contained in:
parent
19fd0cc489
commit
5e11e1f1db
|
@ -245,3 +245,8 @@ func isSubsetOf*(a, b: BitSeq): bool =
|
|||
return false
|
||||
true
|
||||
|
||||
proc isZeros*(x: BitSeq): bool =
|
||||
for w in words(x):
|
||||
if w != 0: return false
|
||||
return true
|
||||
|
||||
|
|
|
@ -147,9 +147,7 @@ func readVarint*[Stream](input: var Stream,
|
|||
##
|
||||
## * `ValueError`
|
||||
## The stream contained an invalid varint value.
|
||||
var
|
||||
parser: VarintParser[type(outVal), flavour]
|
||||
pos = input.pos
|
||||
var parser: VarintParser[type(outVal), flavour]
|
||||
|
||||
while not input.eof:
|
||||
case parser.feedByte(input.read)
|
||||
|
|
Loading…
Reference in New Issue