Skip to content

Commit

Permalink
Simplify condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Urhengulas authored Oct 28, 2024
1 parent 25bc28e commit 5e514c3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ fn notmain() -> Result<i32> {
let raw_args = env::args().skip(1).collect::<Vec<_>>();

// If there's no argument provided, print the help message
if matches!(
raw_args
.iter()
.map(|s| s.as_str())
.collect::<Vec<&str>>()
.as_slice(),
[] | ["--help"] | ["-h"]
) {
if let None | Some("--help" | "-h") = raw_args.first().map(String::as_str) {
eprintln!(
"flip-link: adds zero-cost stack overflow protection to your \
embedded programs\nYou should not use flip-link directly from \
Expand Down

0 comments on commit 5e514c3

Please sign in to comment.