From c34b3127301caf03f5f77311d4005ca322486a85 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Fri, 1 Nov 2024 14:50:25 -0400 Subject: [PATCH] Slight deduplication of `algoDigestBuilder` --- hnix-store-core/src/System/Nix/Hash.hs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/hnix-store-core/src/System/Nix/Hash.hs b/hnix-store-core/src/System/Nix/Hash.hs index 658e2783..79fb7fd6 100644 --- a/hnix-store-core/src/System/Nix/Hash.hs +++ b/hnix-store-core/src/System/Nix/Hash.hs @@ -185,7 +185,4 @@ digestBuilder digest = -- | Builder for @DSum HashAlgo Digest@s algoDigestBuilder :: DSum HashAlgo Digest -> Builder -algoDigestBuilder (a :=> d) = - Data.Text.Lazy.Builder.fromText (System.Nix.Hash.algoToText a) - <> ":" - <> Data.Text.Lazy.Builder.fromText (encodeDigestWith NixBase32 d) +algoDigestBuilder (a :=> d) = has @NamedAlgo a $ digestBuilder d