Skip to content

Commit

Permalink
fixing clippy complains
Browse files Browse the repository at this point in the history
  • Loading branch information
czarte committed Oct 10, 2024
1 parent fff1c3d commit 3456b2e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions masq/src/commands/set_exit_location_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ impl SetExitLocationCommand {
true => matches
.value_of("country-codes")
.expectv("required param")
.split("|")
.split('|')
.enumerate()
.map(|(index, code)| CountryCodes::from((code.to_string(), index)))
.collect(),
false => vec![],
};
let fallback_routing = match (
matches.is_present("fallback-routing"),
matches.is_present("country-codes"),
) {
(false, true) => false,
_ => true,
};
let fallback_routing = !matches!(
(
matches.is_present("fallback-routing"),
matches.is_present("country-codes")
),
(false, true)
);
Ok(SetExitLocationCommand {
exit_locations,
fallback_routing,
Expand All @@ -50,7 +50,7 @@ impl Command for SetExitLocationCommand {
fn execute(&self, context: &mut dyn CommandContext) -> Result<(), CommandError> {
let input = UiSetExitLocationRequest {
exit_locations: self.exit_locations.clone(),
fallback_routing: self.fallback_routing.clone(),
fallback_routing: self.fallback_routing,
};

let _: UiSetExitLocationResponse =
Expand Down

0 comments on commit 3456b2e

Please sign in to comment.