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:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user