diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2023-03-02 22:02:19 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-03-02 22:02:19 +0100 |
| commit | 3908cbf7e8f3a0e7da7dbe132afd387f227a8a3a (patch) | |
| tree | 9a37c2b89341611790153f28b09445a754e2bd05 /xtask/src/argument_parsing.rs | |
| parent | 0a995e46c70dc193955d358d55cb111c2bba9505 (diff) | |
xtask: Allow passing arguments to book and doc
Diffstat (limited to 'xtask/src/argument_parsing.rs')
| -rw-r--r-- | xtask/src/argument_parsing.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/xtask/src/argument_parsing.rs b/xtask/src/argument_parsing.rs index aff464c..1fc06c1 100644 --- a/xtask/src/argument_parsing.rs +++ b/xtask/src/argument_parsing.rs @@ -185,7 +185,7 @@ pub enum Commands { /// arguments will be passed on /// /// Example: `cargo xtask size -- -A` - Size(Size), + Size(Arg), /// Run examples in QEMU and compare against expected output /// @@ -204,13 +204,18 @@ pub enum Commands { Run(QemuAndRun), /// Build docs - Doc, + /// + /// To pass options to `cargo doc`, add `--` and then the following + /// arguments will be passed on + /// + /// Example: `cargo xtask doc -- --open` + Doc(Arg), /// Run tests Test(PackageOpt), /// Build books with mdbook - Book, + Book(Arg), } #[derive(Args, Debug)] @@ -232,14 +237,14 @@ pub struct QemuAndRun { } #[derive(Debug, Parser)] -pub struct Size { +pub struct Arg { /// Options to pass to `cargo size` #[command(subcommand)] - pub sizearguments: Option<Sizearguments>, + pub arguments: Option<ExtraArguments>, } #[derive(Clone, Debug, PartialEq, Parser)] -pub enum Sizearguments { +pub enum ExtraArguments { /// All remaining flags and options #[command(external_subcommand)] Other(Vec<String>), |
