diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2022-08-24 14:49:58 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2022-08-24 14:49:58 +0200 |
commit | 56d97d4b4df02e3464a2f003a90b7f6abae16722 (patch) | |
tree | 175a64d7753121d85daf01562c7368b9694aeb72 /src | |
parent | 8d906b1f3bd4343b6b309ddfca824d5dd00a09b1 (diff) |
Remove redundant Finally
Diffstat (limited to 'src')
-rw-r--r-- | src/libstore/store-api.cc | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/libstore/store-api.cc b/src/libstore/store-api.cc index 2cd6c15ec..86b12257a 100644 --- a/src/libstore/store-api.cc +++ b/src/libstore/store-api.cc @@ -11,7 +11,6 @@ #include "archive.hh" #include "callback.hh" #include "remote-store.hh" -#include "finally.hh" #include <regex> @@ -309,7 +308,6 @@ void Store::addMultipleToStore( auto & [info_, source_] = *infosMap.at(path); auto info = info_; - auto source = std::move(source_); info.ultimate = false; /* Make sure that the Source object is destroyed when @@ -317,9 +315,7 @@ void Store::addMultipleToStore( be destroyed to ensure that the destructors on its stack frame are run; this includes LegacySSHStore::narFromPath()'s connection lock. */ - Finally cleanupSource{[&]() { - source.reset(); - }}; + auto source = std::move(source_); if (!isValidPath(info.path)) { MaintainCount<decltype(nrRunning)> mc(nrRunning); |