summaryrefslogtreecommitdiff
path: root/src/buildtool/crypto/hash_info.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/crypto/hash_info.cpp')
-rw-r--r--src/buildtool/crypto/hash_info.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/buildtool/crypto/hash_info.cpp b/src/buildtool/crypto/hash_info.cpp
index 4fb87161..e185d214 100644
--- a/src/buildtool/crypto/hash_info.cpp
+++ b/src/buildtool/crypto/hash_info.cpp
@@ -21,16 +21,6 @@
#include "src/utils/cpp/hex_string.hpp"
namespace {
-[[nodiscard]] inline auto GetHashTypeName(HashFunction::Type type) noexcept
- -> std::string {
- switch (type) {
- case HashFunction::Type::GitSHA1:
- return "GitSHA1";
- case HashFunction::Type::PlainSHA256:
- return "PlainSHA256";
- }
- Ensures(false);
-}
inline constexpr auto kSHA1EmptyGitBlobHash =
"e69de29bb2d1d6434b8b29ae775ad8c2e48c5391";
@@ -91,7 +81,7 @@ auto HashInfo::ValidateInput(HashFunction::Type type,
"HashInfo: hash {} is expected to be {}.\nTrees are "
"not allowed in this mode.",
hash,
- GetHashTypeName(type));
+ ToString(type));
}
if (auto const exp_size = HashFunction{type}.MakeHasher().GetHashLength();
@@ -100,7 +90,7 @@ auto HashInfo::ValidateInput(HashFunction::Type type,
"HashInfo: hash {} is expected to be {}.\n It must have a length "
"of {}, but its length is {}.",
hash,
- GetHashTypeName(type),
+ ToString(type),
exp_size,
hash.size());
}