From f2e33c07436921539a0d6d37214fa5dfe375a8a6 Mon Sep 17 00:00:00 2001 From: Matthew Craven Date: Mon, 5 Jun 2023 14:21:29 -0400 Subject: [PATCH] Remove some dead branches from toStrict (#590) --- Data/ByteString/Lazy/Internal.hs | 2 -- 1 file changed, 2 deletions(-) diff --git a/Data/ByteString/Lazy/Internal.hs b/Data/ByteString/Lazy/Internal.hs index 88ca68aa6..9b3cd76ac 100644 --- a/Data/ByteString/Lazy/Internal.hs +++ b/Data/ByteString/Lazy/Internal.hs @@ -332,12 +332,10 @@ toStrict = \cs -> goLen0 cs cs where -- It's still possible that the result is empty goLen0 _ Empty = S.BS S.nullForeignPtr 0 - goLen0 cs0 (Chunk (S.BS _ 0) cs) = goLen0 cs0 cs goLen0 cs0 (Chunk c cs) = goLen1 cs0 c cs -- It's still possible that the result is a single chunk goLen1 _ bs Empty = bs - goLen1 cs0 bs (Chunk (S.BS _ 0) cs) = goLen1 cs0 bs cs goLen1 cs0 (S.BS _ bl) (Chunk (S.BS _ cl) cs) = goLen cs0 (S.checkedAdd "Lazy.toStrict" bl cl) cs