From 4f628f74dd631e7fb359f425534febd85bf59aaf Mon Sep 17 00:00:00 2001 From: Jean-Paul Calderone <exarkun@twistedmatrix.com> Date: Tue, 16 May 2023 10:30:42 -0400 Subject: [PATCH] very slight simplification to the Share get implementation --- src/Tahoe/SDMF/Internal/Share.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Tahoe/SDMF/Internal/Share.hs b/src/Tahoe/SDMF/Internal/Share.hs index f62cc96..0bbad62 100644 --- a/src/Tahoe/SDMF/Internal/Share.hs +++ b/src/Tahoe/SDMF/Internal/Share.hs @@ -128,10 +128,9 @@ instance Binary Share where shareSequenceNumber <- getWord64be shareRootHash <- getByteString 32 ivBytes <- getByteString 16 - shareIV <- - Keys.SDMF_IV <$> case makeIV ivBytes of - Nothing -> fail "Could not decode IV" - Just iv -> pure iv + shareIV <- case makeIV ivBytes of + Nothing -> fail "Could not decode IV" + Just iv -> pure (Keys.SDMF_IV iv) shareRequiredShares <- getWord8 shareTotalShares <- getWord8 -- GitLab