mirror of
https://github.com/NixOS/nix
synced 2025-07-06 21:41:48 +02:00
* Pass HashType values instead of strings.
This commit is contained in:
parent
1307b22223
commit
ff762fb499
11 changed files with 36 additions and 23 deletions
|
@ -335,4 +335,13 @@ HashType parseHashType(const string & s)
|
|||
}
|
||||
|
||||
|
||||
string printHashType(HashType ht)
|
||||
{
|
||||
if (ht == htMD5) return "md5";
|
||||
else if (ht == htSHA1) return "sha1";
|
||||
else if (ht == htSHA256) return "sha256";
|
||||
else throw Error("cannot print unknown hash type");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue