summaryrefslogtreecommitdiffhomepage
path: root/mullvad-management-interface/src
diff options
context:
space:
mode:
authorJonathan <jonathan@mullvad.net>2023-06-28 14:36:24 +0200
committerJonathan <jonathan@mullvad.net>2023-06-29 15:00:10 +0200
commit5f61ba4058337e6985cee99661a59a98ebff6dd0 (patch)
treeba94b7e0829f2fd57a9974b4590af59e9937e5be /mullvad-management-interface/src
parentb4bf8124fbc30bf891f70f120265f30c490d1244 (diff)
downloadmullvadvpn-5f61ba4058337e6985cee99661a59a98ebff6dd0.tar.xz
mullvadvpn-5f61ba4058337e6985cee99661a59a98ebff6dd0.zip
Add settings migration code, refactor and cleanup
Bump the settings version. Add code for migrating settings to new version since it is now not backwards compatible. Refactor LocationConstraint and related types to be more lean. Cleanup issues and fix formatting. Refactor LocationConstraint and add migration code
Diffstat (limited to 'mullvad-management-interface/src')
-rw-r--r--mullvad-management-interface/src/types/conversions/relay_constraints.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/mullvad-management-interface/src/types/conversions/relay_constraints.rs b/mullvad-management-interface/src/types/conversions/relay_constraints.rs
index 221c2140b2..e987ca102b 100644
--- a/mullvad-management-interface/src/types/conversions/relay_constraints.rs
+++ b/mullvad-management-interface/src/types/conversions/relay_constraints.rs
@@ -488,7 +488,7 @@ impl From<mullvad_types::relay_constraints::LocationConstraint> for proto::Locat
fn from(location: mullvad_types::relay_constraints::LocationConstraint) -> Self {
use mullvad_types::relay_constraints::LocationConstraint;
match location {
- LocationConstraint::Location { location } => Self {
+ LocationConstraint::Location(location) => Self {
r#type: Some(proto::location_constraint::Type::Location(
proto::RelayLocation::from(location),
)),
@@ -515,7 +515,7 @@ impl TryFrom<proto::LocationConstraint>
match location {
Constraint::Any => Ok(Constraint::Any),
Constraint::Only(location) => {
- Ok(Constraint::Only(LocationConstraint::Location { location }))
+ Ok(Constraint::Only(LocationConstraint::Location(location)))
}
}
}