Merge "nar-info: use string views for construction" into main

This commit is contained in:
Linus Heckemann
2025-01-24 08:11:28 +00:00
committed by Gerrit Code Review
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
namespace nix {
NarInfo::NarInfo(const Store & store, const std::string & s, const std::string & whence)
NarInfo::NarInfo(const Store & store, const std::string_view & s, const std::string_view & whence)
: ValidPathInfo(StorePath(StorePath::dummy), Hash(Hash::dummy)) // FIXME: hack
{
unsigned line = 1;
+1 -1
View File
@@ -22,7 +22,7 @@ struct NarInfo : ValidPathInfo
{ }
NarInfo(StorePath && path, Hash narHash) : ValidPathInfo(std::move(path), narHash) { }
NarInfo(const ValidPathInfo & info) : ValidPathInfo(info) { }
NarInfo(const Store & store, const std::string & s, const std::string & whence);
NarInfo(const Store & store, const std::string_view & s, const std::string_view & whence);
std::string to_string(const Store & store) const;
};