mirror of
https://github.com/NixOS/nix
synced 2025-07-03 10:21:47 +02:00
* Move parseHash16or32 into libutil, and use in nix-hash.
This commit is contained in:
parent
b12b21825c
commit
49f59dceca
5 changed files with 23 additions and 22 deletions
|
@ -133,14 +133,6 @@ static void opAddFixed(Strings opFlags, Strings opArgs)
|
|||
}
|
||||
|
||||
|
||||
static Hash parseHash16or32(HashType ht, const string & s)
|
||||
{
|
||||
return s.size() == Hash(ht).hashSize * 2
|
||||
? parseHash(ht, s)
|
||||
: parseHash32(ht, s);
|
||||
}
|
||||
|
||||
|
||||
/* Hack to support caching in `nix-prefetch-url'. */
|
||||
static void opPrintFixedPath(Strings opFlags, Strings opArgs)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue