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

Done dev init

This commit is contained in:
mo8it
2024-04-16 03:08:45 +02:00
parent 92777c0a44
commit 25e7696565
3 changed files with 125 additions and 45 deletions

View File

@@ -1,4 +1,4 @@
use anyhow::Result;
use anyhow::{Context, Result};
use clap::Subcommand;
mod check;
@@ -13,8 +13,11 @@ pub enum DevCommands {
impl DevCommands {
pub fn run(self) -> Result<()> {
match self {
DevCommands::Init => init::init(),
DevCommands::Init => init::init().context(INIT_ERR),
DevCommands::Check => check::check(),
}
}
}
const INIT_ERR: &str = "Initialization failed.
After resolving the issue, delete the `rustlings` directory (if it was created) and try again";