1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-02 05:11:47 +02:00

treewide: Reference HashFormat members with scope

Base* -> HashFormat::Base*
This commit is contained in:
Yueh-Shun Li 2023-10-13 09:48:15 +08:00
parent 5043e6cf4e
commit e026f3e1ae
37 changed files with 108 additions and 108 deletions

View file

@ -406,7 +406,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
auto info = store->queryPathInfo(j);
if (query == qHash) {
assert(info->narHash.type == htSHA256);
cout << fmt("%s\n", info->narHash.to_string(Base32, true));
cout << fmt("%s\n", info->narHash.to_string(HashFormat::Base32, true));
} else if (query == qSize)
cout << fmt("%d\n", info->narSize);
}
@ -769,8 +769,8 @@ static void opVerifyPath(Strings opFlags, Strings opArgs)
if (current.first != info->narHash) {
printError("path '%s' was modified! expected hash '%s', got '%s'",
store->printStorePath(path),
info->narHash.to_string(Base32, true),
current.first.to_string(Base32, true));
info->narHash.to_string(HashFormat::Base32, true),
current.first.to_string(HashFormat::Base32, true));
status = 1;
}
}
@ -892,7 +892,7 @@ static void opServe(Strings opFlags, Strings opArgs)
out << info->narSize // downloadSize
<< info->narSize;
if (GET_PROTOCOL_MINOR(clientVersion) >= 4)
out << info->narHash.to_string(Base32, true)
out << info->narHash.to_string(HashFormat::Base32, true)
<< renderContentAddress(info->ca)
<< info->sigs;
} catch (InvalidPath &) {