aboutsummaryrefslogtreecommitdiff
path: root/src/nix/add-to-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2020-05-04 22:40:19 +0200
committerEelco Dolstra <edolstra@gmail.com>2020-05-04 22:40:19 +0200
commita721a0b1140bf489d645f5d85737acafc1c57c65 (patch)
treef4b7df80fccc95b46fd3e8419375b563b466cfa4 /src/nix/add-to-store.cc
parente9f10beed1a30fe80b315a9de4c4c2ab11527db8 (diff)
Flag: Use designated initializers
Diffstat (limited to 'src/nix/add-to-store.cc')
-rw-r--r--src/nix/add-to-store.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nix/add-to-store.cc b/src/nix/add-to-store.cc
index ed02227db..00da01f7e 100644
--- a/src/nix/add-to-store.cc
+++ b/src/nix/add-to-store.cc
@@ -14,12 +14,13 @@ struct CmdAddToStore : MixDryRun, StoreCommand
{
expectArg("path", &path);
- mkFlag()
- .longName("name")
- .shortName('n')
- .description("name component of the store path")
- .labels({"name"})
- .dest(&namePart);
+ addFlag({
+ .longName = "name",
+ .shortName = 'n',
+ .description = "name component of the store path",
+ .labels = {"name"},
+ .handler = {&namePart},
+ });
}
std::string description() override