Skip to content

Commit

Permalink
Swap guard cases
Browse files Browse the repository at this point in the history
  • Loading branch information
elikoga committed Oct 27, 2020
1 parent 001184b commit d36d5a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Data/ByteString/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,8 @@ times :: Integral a => a -> ByteString -> ByteString
times n (BS fp len)
| n < 0 = error "stimes: non-negative multiplier expected"
| n == 0 = mempty
| len == 0 = mempty
| n == 1 = BS fp len
| len == 0 = mempty
| len == 1 = unsafeCreate size $ \destptr ->
withForeignPtr fp $ \p -> do
byte <- peek p
Expand Down

0 comments on commit d36d5a3

Please sign in to comment.