mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-25 23:04:17 -05:00
dev init -> dev new PATH
This commit is contained in:
parent
30040d7778
commit
61a84a2c11
2 changed files with 4 additions and 4 deletions
|
@ -4,12 +4,12 @@ use clap::Subcommand;
|
||||||
use crate::DEBUG_PROFILE;
|
use crate::DEBUG_PROFILE;
|
||||||
|
|
||||||
mod check;
|
mod check;
|
||||||
mod init;
|
mod new;
|
||||||
mod update;
|
mod update;
|
||||||
|
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
pub enum DevCommands {
|
pub enum DevCommands {
|
||||||
Init,
|
New { path: String },
|
||||||
Check,
|
Check,
|
||||||
Update,
|
Update,
|
||||||
}
|
}
|
||||||
|
@ -17,12 +17,12 @@ pub enum DevCommands {
|
||||||
impl DevCommands {
|
impl DevCommands {
|
||||||
pub fn run(self) -> Result<()> {
|
pub fn run(self) -> Result<()> {
|
||||||
match self {
|
match self {
|
||||||
DevCommands::Init => {
|
DevCommands::New { path } => {
|
||||||
if DEBUG_PROFILE {
|
if DEBUG_PROFILE {
|
||||||
bail!("Disabled in the debug build");
|
bail!("Disabled in the debug build");
|
||||||
}
|
}
|
||||||
|
|
||||||
init::init().context(INIT_ERR)
|
new::init().context(INIT_ERR)
|
||||||
}
|
}
|
||||||
DevCommands::Check => check::check(),
|
DevCommands::Check => check::check(),
|
||||||
DevCommands::Update => update::update(),
|
DevCommands::Update => update::update(),
|
||||||
|
|
Loading…
Reference in a new issue