Skip to content

Commit

Permalink
Bit testing can use unsafeRead because the length was verified
Browse files Browse the repository at this point in the history
  • Loading branch information
kquick committed Mar 24, 2024
1 parent ceb340a commit 2992d7e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Data/Graph/Haggle/Internal/BitSet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,5 @@ testBit (BS v sz) bitIx
| otherwise = do
let wordIx = bitIx `div` bitsPerWord
bitPos = bitIx `mod` bitsPerWord
w <- V.read v wordIx
w <- V.unsafeRead v wordIx
return $ B.testBit w bitPos

0 comments on commit 2992d7e

Please sign in to comment.