Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Kijewski committed Nov 30, 2022
1 parent 2f5a693 commit a6f08ce
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions examples/current-time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,12 @@ pub fn main() -> Result<()> {
}

let timezone = if let Some(argument) = argument {
match tz_by_name(&argument) {
Some(timezone) => timezone,
None => {
eprintln!("No such time zone found in database: {:?}", argument);
eprintln!("To see a list of all known time zones run: {} --list", exe);
exit(1);
},
if let Some(timezone) = tz_by_name(&argument) {
timezone
} else {
eprintln!("No such time zone found in database: {:?}", argument);
eprintln!("To see a list of all known time zones run: {} --list", exe);
exit(1);
}
} else {
eprintln!("No time zone selected, defaulting to the system time zone.");
Expand Down

0 comments on commit a6f08ce

Please sign in to comment.