aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libutil/hash.cc2
-rw-r--r--src/libutil/hash.hh2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/hash.cc b/src/libutil/hash.cc
index 5a7be47b2..84832c4ad 100644
--- a/src/libutil/hash.cc
+++ b/src/libutil/hash.cc
@@ -403,7 +403,7 @@ HashType parseHashType(std::string_view s)
throw UsageError("unknown hash algorithm '%1%'", s);
}
-std::string printHashType(HashType ht)
+std::string_view printHashType(HashType ht)
{
switch (ht) {
case htMD5: return "md5";
diff --git a/src/libutil/hash.hh b/src/libutil/hash.hh
index 00f70a572..38d09646e 100644
--- a/src/libutil/hash.hh
+++ b/src/libutil/hash.hh
@@ -133,7 +133,7 @@ HashType parseHashType(std::string_view s);
std::optional<HashType> parseHashTypeOpt(std::string_view s);
/* And the reverse. */
-std::string printHashType(HashType ht);
+std::string_view printHashType(HashType ht);
union Ctx;