diff options
| author | mo8it <mo8it@proton.me> | 2024-04-25 15:58:46 +0200 |
|---|---|---|
| committer | mo8it <mo8it@proton.me> | 2024-04-25 15:58:46 +0200 |
| commit | c51f1b3f31478f8c82acbd83e9ae873e29159c5f (patch) | |
| tree | 4f310d682d7bdbf8206746a9fedce486555ee6f6 /src | |
| parent | 8bf8b19a5dd4278a636a56440736c8f3df52b7a5 (diff) | |
Thanks Clippy :D
Diffstat (limited to 'src')
| -rw-r--r-- | src/dev.rs | 6 | ||||
| -rw-r--r-- | src/dev/check.rs | 6 |
2 files changed, 5 insertions, 7 deletions
@@ -28,15 +28,15 @@ pub enum DevCommands { impl DevCommands { pub fn run(self) -> Result<()> { match self { - DevCommands::New { path, no_git } => { + Self::New { path, no_git } => { if DEBUG_PROFILE { bail!("Disabled in the debug build"); } new::new(&path, no_git).context(INIT_ERR) } - DevCommands::Check => check::check(), - DevCommands::Update => update::update(), + Self::Check => check::check(), + Self::Update => update::update(), } } } diff --git a/src/dev/check.rs b/src/dev/check.rs index 9859c3e..564aa0a 100644 --- a/src/dev/check.rs +++ b/src/dev/check.rs @@ -151,11 +151,9 @@ fn check_cargo_toml( if old_bins != new_bins { if DEBUG_PROFILE { 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(()) |
