mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-26 00:00:03 +03:00
Thanks Clippy :D
This commit is contained in:
parent
8bf8b19a5d
commit
c51f1b3f31
|
@ -28,15 +28,15 @@ pub enum DevCommands {
|
||||||
impl DevCommands {
|
impl DevCommands {
|
||||||
pub fn run(self) -> Result<()> {
|
pub fn run(self) -> Result<()> {
|
||||||
match self {
|
match self {
|
||||||
DevCommands::New { path, no_git } => {
|
Self::New { path, no_git } => {
|
||||||
if DEBUG_PROFILE {
|
if DEBUG_PROFILE {
|
||||||
bail!("Disabled in the debug build");
|
bail!("Disabled in the debug build");
|
||||||
}
|
}
|
||||||
|
|
||||||
new::new(&path, no_git).context(INIT_ERR)
|
new::new(&path, no_git).context(INIT_ERR)
|
||||||
}
|
}
|
||||||
DevCommands::Check => check::check(),
|
Self::Check => check::check(),
|
||||||
DevCommands::Update => update::update(),
|
Self::Update => update::update(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,11 +151,9 @@ fn check_cargo_toml(
|
||||||
if old_bins != new_bins {
|
if old_bins != new_bins {
|
||||||
if DEBUG_PROFILE {
|
if DEBUG_PROFILE {
|
||||||
bail!("The file `dev/Cargo.toml` is outdated. Please run `cargo run -- dev update` to update it");
|
bail!("The file `dev/Cargo.toml` is outdated. Please run `cargo run -- dev update` to update it");
|
||||||
} else {
|
|
||||||
bail!(
|
|
||||||
"The file `Cargo.toml` is outdated. Please run `rustlings dev update` to update it",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bail!("The file `Cargo.toml` is outdated. Please run `rustlings dev update` to update it");
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in a new issue