Skip to content

Commit

Permalink
Merge pull request #292 from obsidiansystems/slight-dedup
Browse files Browse the repository at this point in the history
Slight deduplication of `algoDigestBuilder`
  • Loading branch information
Ericson2314 authored Nov 1, 2024
2 parents 9b24233 + c34b312 commit dd69c4c
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 dd69c4c

Please sign in to comment.