blob: e09996f88cd82ca1d0f3243ceb989ff493224a27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
use anyhow::{Context, 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().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";
|