diff options
| -rw-r--r-- | mullvad-relay-selector/src/relay_selector/query.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mullvad-relay-selector/src/relay_selector/query.rs b/mullvad-relay-selector/src/relay_selector/query.rs index 162865368a..1f0e393ac1 100644 --- a/mullvad-relay-selector/src/relay_selector/query.rs +++ b/mullvad-relay-selector/src/relay_selector/query.rs @@ -539,8 +539,8 @@ pub mod builder { // [`WireguardRelayQuery`] & [`OpenVpnRelayQuery`] impl<VpnProtocol> RelayQueryBuilder<VpnProtocol> { /// Configure the [`LocationConstraint`] to use. - pub fn location(mut self, location: GeographicLocationConstraint) -> Self { - self.query.location = Constraint::Only(LocationConstraint::from(location)); + pub fn location(mut self, location: impl Into<LocationConstraint>) -> Self { + self.query.location = Constraint::Only(location.into()); self } @@ -732,9 +732,8 @@ pub mod builder { { /// Set the entry location in a multihop configuration. This requires /// multihop to be enabled. - pub fn entry(mut self, location: GeographicLocationConstraint) -> Self { - self.query.wireguard_constraints.entry_location = - Constraint::Only(LocationConstraint::from(location)); + pub fn entry(mut self, location: impl Into<LocationConstraint>) -> Self { + self.query.wireguard_constraints.entry_location = Constraint::Only(location.into()); self } } |
