1
0
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:
mo8it
2024-04-15 23:54:57 +02:00
parent f5eaa578b9
commit 7ebc260924
4 changed files with 39 additions and 12 deletions

20
src/dev.rs Normal file
View 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(),
}
}
}