diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-05-04 22:40:19 +0200 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-05-04 22:40:19 +0200 |
commit | a721a0b1140bf489d645f5d85737acafc1c57c65 (patch) | |
tree | f4b7df80fccc95b46fd3e8419375b563b466cfa4 /src/nix/add-to-store.cc | |
parent | e9f10beed1a30fe80b315a9de4c4c2ab11527db8 (diff) |
Flag: Use designated initializers
Diffstat (limited to 'src/nix/add-to-store.cc')
-rw-r--r-- | src/nix/add-to-store.cc | 13 |
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 |