diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-03-01 19:57:25 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-03-01 19:57:25 +0000 |
commit | 10a57b8109cbc54c6f6aaae3b61a56fd0529a24a (patch) | |
tree | 853814ebd410f865e3ba08942d35fc2b58c44245 /xtask/src/codegen.rs | |
parent | a6ee8e9e7627cdbf39198716234648e1730bfc2d (diff) | |
parent | d8f7f2dee9eeb0b71dfa552c3366f264b783e275 (diff) |
Merge #7835
7835: Use cli parser with auto-generated help r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src/codegen.rs')
-rw-r--r-- | xtask/src/codegen.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/xtask/src/codegen.rs b/xtask/src/codegen.rs index 743e83e76..2f56c5ad0 100644 --- a/xtask/src/codegen.rs +++ b/xtask/src/codegen.rs | |||
@@ -18,7 +18,7 @@ use std::{ | |||
18 | }; | 18 | }; |
19 | use xshell::{cmd, pushenv, read_file, write_file}; | 19 | use xshell::{cmd, pushenv, read_file, write_file}; |
20 | 20 | ||
21 | use crate::{ensure_rustfmt, project_root, Result}; | 21 | use crate::{ensure_rustfmt, flags, project_root, Result}; |
22 | 22 | ||
23 | pub(crate) use self::{ | 23 | pub(crate) use self::{ |
24 | gen_assists_docs::{generate_assists_docs, generate_assists_tests}, | 24 | gen_assists_docs::{generate_assists_docs, generate_assists_tests}, |
@@ -35,11 +35,7 @@ pub(crate) enum Mode { | |||
35 | Verify, | 35 | Verify, |
36 | } | 36 | } |
37 | 37 | ||
38 | pub(crate) struct CodegenCmd { | 38 | impl flags::Codegen { |
39 | pub(crate) features: bool, | ||
40 | } | ||
41 | |||
42 | impl CodegenCmd { | ||
43 | pub(crate) fn run(self) -> Result<()> { | 39 | pub(crate) fn run(self) -> Result<()> { |
44 | if self.features { | 40 | if self.features { |
45 | generate_lint_completions(Mode::Overwrite)?; | 41 | generate_lint_completions(Mode::Overwrite)?; |