diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-09 15:27:48 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2022-03-11 13:32:33 +0000 |
commit | a03b1fd7f60788304f358d5f4dc063c7c9e650a9 (patch) | |
tree | e5ec34a44b96ad4b384aca9343033292b26606fb /src/nix/store-copy-log.cc | |
parent | 678d1c2aa0f499466c723d3461277dc197515f57 (diff) |
Deduplicate the Store downcasting with a template
Diffstat (limited to 'src/nix/store-copy-log.cc')
-rw-r--r-- | src/nix/store-copy-log.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nix/store-copy-log.cc b/src/nix/store-copy-log.cc index 22b3980c0..2e288f743 100644 --- a/src/nix/store-copy-log.cc +++ b/src/nix/store-copy-log.cc @@ -1,6 +1,7 @@ #include "command.hh" #include "shared.hh" #include "store-api.hh" +#include "store-cast.hh" #include "log-store.hh" #include "sync.hh" #include "thread-pool.hh" @@ -27,10 +28,10 @@ struct CmdCopyLog : virtual CopyCommand, virtual InstallablesCommand void run(ref<Store> srcStore) override { - auto & srcLogStore = LogStore::require(*srcStore); + auto & srcLogStore = require<LogStore>(*srcStore); auto dstStore = getDstStore(); - auto & dstLogStore = LogStore::require(*dstStore); + auto & dstLogStore = require<LogStore>(*dstStore); StorePathSet drvPaths; |