Skip to content

Commit

Permalink
fix AppendBit bug
Browse files Browse the repository at this point in the history
  • Loading branch information
weiihann committed Jan 21, 2025
1 parent 7206dcb commit 4593de5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/trie/bitarray.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func (b *BitArray) Append(x, y *BitArray) *BitArray {

// Sets the bit array to the concatenation of x and a single bit.
func (b *BitArray) AppendBit(x *BitArray, bit uint8) *BitArray {
return b.Append(b, new(BitArray).SetBit(bit))
return b.Append(x, new(BitArray).SetBit(bit))

Check warning on line 326 in core/trie/bitarray.go

View check run for this annotation

Codecov / codecov/patch

core/trie/bitarray.go#L325-L326

Added lines #L325 - L326 were not covered by tests
}

// Sets the bit array to a subset of x from startPos (inclusive) to endPos (exclusive),
Expand Down

0 comments on commit 4593de5

Please sign in to comment.