mirror of
https://github.com/rust-lang/rustlings.git
synced 2025-12-05 23:08:14 +02:00
Scetch the dev subcommand
This commit is contained in:
20
src/dev.rs
Normal file
20
src/dev.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
use anyhow::Result;
|
||||
use clap::Subcommand;
|
||||
|
||||
mod check;
|
||||
mod init;
|
||||
|
||||
#[derive(Subcommand)]
|
||||
pub enum DevCommands {
|
||||
Init,
|
||||
Check,
|
||||
}
|
||||
|
||||
impl DevCommands {
|
||||
pub fn run(self) -> Result<()> {
|
||||
match self {
|
||||
DevCommands::Init => init::init(),
|
||||
DevCommands::Check => check::check(),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user