Skip to content

Commit

Permalink
Remove some points
Browse files Browse the repository at this point in the history
  • Loading branch information
noughtmare committed Mar 3, 2022
1 parent fa29631 commit fb41f64
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Data/ByteString/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -339,17 +339,17 @@ packChars cs = unsafePackLenChars (List.length cs) cs
#-}

unsafePackLenBytes :: Int -> [Word8] -> ByteString
unsafePackLenBytes len xs =
unsafeCreate len $ \p0 -> foldr
unsafePackLenBytes len =
unsafeCreate len . foldr
(\x go p -> poke p x >> go (p `plusPtr` 1))
(\_ -> return ()) xs p0
(\_ -> return ())
{-# INLINE unsafePackLenBytes #-}

unsafePackLenChars :: Int -> [Char] -> ByteString
unsafePackLenChars len cs =
unsafeCreate len $ \p0 -> foldr
unsafePackLenChars len =
unsafeCreate len . foldr
(\x go p -> poke p (c2w x) >> go (p `plusPtr` 1))
(\_ -> return ()) cs p0
(\_ -> return ())
{-# INLINE unsafePackLenChars #-}


Expand Down

0 comments on commit fb41f64

Please sign in to comment.