summaryrefslogtreecommitdiffhomepage
path: root/mullvad-cli/src
diff options
context:
space:
mode:
Diffstat (limited to 'mullvad-cli/src')
-rw-r--r--mullvad-cli/src/cmds/bridge.rs2
-rw-r--r--mullvad-cli/src/cmds/relay.rs6
-rw-r--r--mullvad-cli/src/cmds/relay_constraints.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/mullvad-cli/src/cmds/bridge.rs b/mullvad-cli/src/cmds/bridge.rs
index e43fce1b51..3cc1a95b37 100644
--- a/mullvad-cli/src/cmds/bridge.rs
+++ b/mullvad-cli/src/cmds/bridge.rs
@@ -168,7 +168,7 @@ impl Bridge {
} else {
Constraint::from(location)
};
- let location = location.map(|location| LocationConstraint::Location { location });
+ let location = location.map(LocationConstraint::Location);
Self::update_bridge_settings(&mut rpc, Some(location), None, None).await
}
SetCommands::CustomList { custom_list_name } => {
diff --git a/mullvad-cli/src/cmds/relay.rs b/mullvad-cli/src/cmds/relay.rs
index 1bb395c4e5..83f4ad4fdd 100644
--- a/mullvad-cli/src/cmds/relay.rs
+++ b/mullvad-cli/src/cmds/relay.rs
@@ -450,7 +450,7 @@ impl Relay {
// The country field is assumed to be hostname due to CLI argument parsing
find_relay_by_hostname(&countries, &location_constraint_args.country)
{
- Constraint::Only(LocationConstraint::Location { location: relay })
+ Constraint::Only(LocationConstraint::Location(relay))
} else {
let location_constraint: Constraint<GeographicLocationConstraint> =
Constraint::from(location_constraint_args);
@@ -468,7 +468,7 @@ impl Relay {
}
}
}
- location_constraint.map(|location| LocationConstraint::Location { location })
+ location_constraint.map(LocationConstraint::Location)
};
Self::update_constraints(RelaySettingsUpdate::Normal(RelayConstraintsUpdate {
@@ -576,7 +576,7 @@ impl Relay {
// The country field is assumed to be hostname due to CLI argument parsing
wireguard_constraints.entry_location =
if let Some(relay) = find_relay_by_hostname(&countries, &entry.country) {
- Constraint::Only(LocationConstraint::Location { location: relay })
+ Constraint::Only(LocationConstraint::Location(relay))
} else {
Constraint::from(entry)
};
diff --git a/mullvad-cli/src/cmds/relay_constraints.rs b/mullvad-cli/src/cmds/relay_constraints.rs
index dc79e79f0b..626754edcb 100644
--- a/mullvad-cli/src/cmds/relay_constraints.rs
+++ b/mullvad-cli/src/cmds/relay_constraints.rs
@@ -49,6 +49,6 @@ impl From<LocationArgs> for Constraint<LocationConstraint> {
}
_ => unreachable!("invalid location arguments"),
};
- Constraint::Only(LocationConstraint::Location { location })
+ Constraint::Only(LocationConstraint::Location(location))
}
}