1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-13 05:56:03 +01:00

Merge branch 'path-info' into ca-drv-exotic

This commit is contained in:
John Ericson 2022-03-10 16:20:01 +00:00
commit 938650700f
427 changed files with 22834 additions and 36076 deletions

View file

@ -144,8 +144,10 @@ ContentAddress parseContentAddress(std::string_view rawCa) {
std::pair<ContentAddressMethod, HashType> parseContentAddressMethod(std::string_view caMethod)
{
std::string_view asPrefix {std::string{caMethod} + ":"};
return parseContentAddressMethodPrefix(asPrefix);
std::string asPrefix = std::string{caMethod} + ":";
// parseContentAddressMethodPrefix takes its argument by reference
std::string_view asPrefixView = asPrefix;
return parseContentAddressMethodPrefix(asPrefixView);
}
std::optional<ContentAddress> parseContentAddressOpt(std::string_view rawCaOpt)