Skip to content

Commit

Permalink
Slight deduplication of algoDigestBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericson2314 committed Nov 1, 2024
1 parent a41c941 commit c34b312
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions hnix-store-core/src/System/Nix/Hash.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit c34b312

Please sign in to comment.