diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 16:20:01 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-10 16:20:01 +0000 |
commit | 938650700fafe76e3755982d670855fed3db35c6 (patch) | |
tree | 7a6ac217f87cad07bb963ec658bd60625b868466 /src/libstore/content-address.cc | |
parent | 195daa82995b43b3cbd552735a678afb85f4ae28 (diff) | |
parent | 8ba089597fa19bfd49ba5f22a5e821740ca4eb5d (diff) |
Merge branch 'path-info' into ca-drv-exotic
Diffstat (limited to 'src/libstore/content-address.cc')
-rw-r--r-- | src/libstore/content-address.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libstore/content-address.cc b/src/libstore/content-address.cc index e8c6b94be..f8e4e260b 100644 --- a/src/libstore/content-address.cc +++ b/src/libstore/content-address.cc @@ -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) |