Skip to content

Commit

Permalink
chore: match with Operation::Help
Browse files Browse the repository at this point in the history
  • Loading branch information
mxthevs authored and fdaciuk committed Jun 15, 2022
1 parent 1fafc34 commit c7d18cd
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,14 @@ fn main() {
Err(e) => error_exit(&format!("failed to read Cargo.toml file: {}", e)),
};

if let Operation::Help = operation {
usage()
}

let new_version = match operation {
Operation::Version(v) => match v.as_str() {
"patch" => cargo_v::VersionLabel::Patch,
"minor" => cargo_v::VersionLabel::Minor,
"major" => cargo_v::VersionLabel::Major,
version => cargo_v::VersionLabel::NumericVersion(String::from(version)),
},
_ => unreachable!(),
Operation::Help => usage(),
};

let cargo_toml_updated =
Expand Down

0 comments on commit c7d18cd

Please sign in to comment.