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-gc.cc | |
parent | 678d1c2aa0f499466c723d3461277dc197515f57 (diff) |
Deduplicate the Store downcasting with a template
Diffstat (limited to 'src/nix/store-gc.cc')
-rw-r--r-- | src/nix/store-gc.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nix/store-gc.cc b/src/nix/store-gc.cc index 515f4ffdb..8b9b5d164 100644 --- a/src/nix/store-gc.cc +++ b/src/nix/store-gc.cc @@ -2,6 +2,7 @@ #include "common-args.hh" #include "shared.hh" #include "store-api.hh" +#include "store-cast.hh" #include "gc-store.hh" using namespace nix; @@ -34,7 +35,7 @@ struct CmdStoreGC : StoreCommand, MixDryRun void run(ref<Store> store) override { - auto & gcStore = GcStore::require(*store); + auto & gcStore = require<GcStore>(*store); options.action = dryRun ? GCOptions::gcReturnDead : GCOptions::gcDeleteDead; GCResults results; |