1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-12-05 23:08:14 +02:00

Add "dev update"

This commit is contained in:
mo8it
2024-04-17 15:55:50 +02:00
parent 30636e7cf3
commit 501b973c25
13 changed files with 181 additions and 205 deletions

View File

@@ -1,22 +1,23 @@
use anyhow::{Context, Result};
use clap::Subcommand;
use crate::info_file::InfoFile;
mod check;
mod init;
mod update;
#[derive(Subcommand)]
pub enum DevCommands {
Init,
Check,
Update,
}
impl DevCommands {
pub fn run(self, info_file: InfoFile) -> Result<()> {
pub fn run(self) -> Result<()> {
match self {
DevCommands::Init => init::init().context(INIT_ERR),
DevCommands::Check => check::check(info_file),
DevCommands::Check => check::check(),
DevCommands::Update => update::update(),
}
}
}