xtask/npm/
mod.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use anyhow::Result;
use clap::{Args, Subcommand};

use self::nightly::NightlyCmd;

mod nightly;
mod util;

#[derive(Debug, Args)]
pub(super) struct NpmCmd {
    #[clap(subcommand)]
    cmd: Inner,
}

#[derive(Debug, Subcommand)]
enum Inner {
    Nightly(NightlyCmd),
}

impl NpmCmd {
    pub fn run(self) -> Result<()> {
        match self.cmd {
            Inner::Nightly(c) => c.run(),
        }
    }
}