diff options
Diffstat (limited to 'mullvad-cli/src')
| -rw-r--r-- | mullvad-cli/src/cmds/relay.rs | 8 | ||||
| -rw-r--r-- | mullvad-cli/src/format.rs | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/mullvad-cli/src/cmds/relay.rs b/mullvad-cli/src/cmds/relay.rs index d0de98c27a..b56c2c2991 100644 --- a/mullvad-cli/src/cmds/relay.rs +++ b/mullvad-cli/src/cmds/relay.rs @@ -941,10 +941,10 @@ pub async fn resolve_location_constraint( relay_filter: impl FnOnce(&mullvad_types::relay_list::Relay) -> bool, ) -> Result<Constraint<GeographicLocationConstraint>> { let relay_iter = rpc.get_relay_locations().await?.into_relays(); - if let Some(matching_relay) = relay_iter + match relay_iter .clone() .find(|relay| relay.hostname.to_lowercase() == location_constraint_args.country) - { + { Some(matching_relay) => { if relay_filter(&matching_relay) { Ok(Constraint::Only(relay_to_geographical_constraint( matching_relay, @@ -955,7 +955,7 @@ pub async fn resolve_location_constraint( location_constraint_args.country ) } - } else { + } _ => { // The Constraint was not a relay, assuming it to be a location let location_constraint: Constraint<GeographicLocationConstraint> = Constraint::from(location_constraint_args); @@ -970,7 +970,7 @@ pub async fn resolve_location_constraint( } Ok(location_constraint) - } + }} } /// Return a list of all relays that are active and not bridges diff --git a/mullvad-cli/src/format.rs b/mullvad-cli/src/format.rs index fdf105e51f..3292f7eb71 100644 --- a/mullvad-cli/src/format.rs +++ b/mullvad-cli/src/format.rs @@ -12,13 +12,13 @@ use talpid_types::{ #[macro_export] macro_rules! print_option { - ($value:expr $(,)?) => {{ + ($value:expr_2021 $(,)?) => {{ println!("{:<4}{:<24}{}", "", "", $value,) }}; - ($option:literal, $value:expr $(,)?) => {{ + ($option:literal, $value:expr_2021 $(,)?) => {{ println!("{:<4}{:<24}{}", "", concat!($option, ":"), $value,) }}; - ($option:expr, $value:expr $(,)?) => {{ + ($option:expr_2021, $value:expr_2021 $(,)?) => {{ println!("{:<4}{:<24}{}", "", format!("{}:", $option), $value,) }}; } |
