From 5dcfa86910fa6777e33265647f51116e648f2f70 Mon Sep 17 00:00:00 2001 From: Bernardo Meurer Costa Date: Sat, 25 Oct 2025 01:00:10 +0000 Subject: [PATCH] refactor(libstore): use string_view in HttpBinaryCacheStore::makeRequest --- src/libstore/http-binary-cache-store.cc | 2 +- src/libstore/include/nix/store/http-binary-cache-store.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libstore/http-binary-cache-store.cc b/src/libstore/http-binary-cache-store.cc index 945fe1834..738db132d 100644 --- a/src/libstore/http-binary-cache-store.cc +++ b/src/libstore/http-binary-cache-store.cc @@ -161,7 +161,7 @@ void HttpBinaryCacheStore::upsertFile( } } -FileTransferRequest HttpBinaryCacheStore::makeRequest(const std::string & path) +FileTransferRequest HttpBinaryCacheStore::makeRequest(std::string_view path) { /* Otherwise the last path fragment will get discarded. */ auto cacheUriWithTrailingSlash = config->cacheUri; diff --git a/src/libstore/include/nix/store/http-binary-cache-store.hh b/src/libstore/include/nix/store/http-binary-cache-store.hh index d8ba72390..ecad09975 100644 --- a/src/libstore/include/nix/store/http-binary-cache-store.hh +++ b/src/libstore/include/nix/store/http-binary-cache-store.hh @@ -86,7 +86,7 @@ protected: const std::string & mimeType, uint64_t sizeHint) override; - FileTransferRequest makeRequest(const std::string & path); + FileTransferRequest makeRequest(std::string_view path); void getFile(const std::string & path, Sink & sink) override;