From f5fa91bce615297bbc78a4507c0e7b56e6f99845 Mon Sep 17 00:00:00 2001 From: Stevan Andjelkovic Date: Mon, 14 Feb 2022 13:35:44 +0100 Subject: [PATCH] refactor(journal): remove use of slice --- src/journal/test/JournalTest.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/journal/test/JournalTest.hs b/src/journal/test/JournalTest.hs index e91e8116..00cd90dd 100644 --- a/src/journal/test/JournalTest.hs +++ b/src/journal/test/JournalTest.hs @@ -114,13 +114,13 @@ appendBSFake bs fj@(FakeJournal bss ix termCount) = readBytes :: Int readBytes = Vector.sum . Vector.map (\bs -> align (hEADER_LENGTH + BS.length bs) fRAME_ALIGNMENT) - . Vector.slice 0 (max 0 (ix - 1)) + . Vector.take (ix - 1) $ bss unreadBytes :: Int unreadBytes = Vector.sum . Vector.map (\bs -> align (hEADER_LENGTH + BS.length bs) fRAME_ALIGNMENT) - . Vector.slice ix (max 0 (Vector.length bss - 1 - ix)) + . Vector.drop ix $ bss readJournalFake :: FakeJournal -> (FakeJournal, Maybe ByteString)