Skip to content

Commit f2e33c0

Browse files
authored
Remove some dead branches from toStrict (#590)
1 parent 6641404 commit f2e33c0

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Data/ByteString/Lazy/Internal.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,12 +332,10 @@ toStrict = \cs -> goLen0 cs cs
332332
where
333333
-- It's still possible that the result is empty
334334
goLen0 _ Empty = S.BS S.nullForeignPtr 0
335-
goLen0 cs0 (Chunk (S.BS _ 0) cs) = goLen0 cs0 cs
336335
goLen0 cs0 (Chunk c cs) = goLen1 cs0 c cs
337336

338337
-- It's still possible that the result is a single chunk
339338
goLen1 _ bs Empty = bs
340-
goLen1 cs0 bs (Chunk (S.BS _ 0) cs) = goLen1 cs0 bs cs
341339
goLen1 cs0 (S.BS _ bl) (Chunk (S.BS _ cl) cs) =
342340
goLen cs0 (S.checkedAdd "Lazy.toStrict" bl cl) cs
343341

0 commit comments

Comments
 (0)