Skip to content

Commit

Permalink
Fix fail on go1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
yuin committed Dec 8, 2019
1 parent 7d8bee1 commit ec24669
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ func (s *bytesFilter) Add(b []byte) {
m = l
}
for i := 0; i < m; i++ {
s.chars[b[i]] |= 1 << i
s.chars[b[i]] |= 1 << uint8(i)
}
h := bytesHash(b) % uint64(len(s.slots))
slot := s.slots[h]
Expand Down Expand Up @@ -876,7 +876,7 @@ func (s *bytesFilter) Contains(b []byte) bool {
m = l
}
for i := 0; i < m; i++ {
if (s.chars[b[i]] & (1 << i)) == 0 {
if (s.chars[b[i]] & (1 << uint8(i))) == 0 {
return false
}
}
Expand Down

0 comments on commit ec24669

Please sign in to comment.