From b844ef37fb4c180321b47749b86d00d4c346b9e3 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Wed, 26 Feb 2025 16:01:30 -0800 Subject: [PATCH] getFileContents: Remove unused `StringSink` In cl/1549, this function was changed from calling `getFile(path, sink)` to returning `getFile(path)`. As a result, the `StringSink` is no longer used. However, the sink was still being allocated. Change-Id: I26c8556f20bc4f922912d8a921e8f47aa2bf975e --- lix/libstore/binary-cache-store.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/lix/libstore/binary-cache-store.cc b/lix/libstore/binary-cache-store.cc index 4cbf9f073..88a3200b2 100644 --- a/lix/libstore/binary-cache-store.cc +++ b/lix/libstore/binary-cache-store.cc @@ -72,13 +72,11 @@ void BinaryCacheStore::upsertFile(const std::string & path, std::optional BinaryCacheStore::getFileContents(const std::string & path) { - StringSink sink; try { return getFile(path)->drain(); } catch (NoSuchBinaryCacheFile &) { return std::nullopt; } - return std::move(sink.s); } std::string BinaryCacheStore::narInfoFileFor(const StorePath & storePath)