Skip to content

Commit

Permalink
Revert making inner providers field pub
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusPettersson98 committed Mar 21, 2024
1 parent b1ab96d commit 3655554
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mullvad-relay-selector/src/relay_selector/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ impl Intersection for Providers {
where
Self: Sized,
{
Providers::new(self.providers.intersection(&other.providers)).ok()
Providers::new(self.providers().intersection(other.providers())).ok()
}
}

Expand Down
7 changes: 6 additions & 1 deletion mullvad-types/src/relay_constraints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ pub type Provider = String;
#[cfg_attr(target_os = "android", jnix(package = "net.mullvad.mullvadvpn.model"))]
#[derive(Debug, Clone, Eq, PartialEq, Deserialize, Serialize)]
pub struct Providers {
pub providers: HashSet<Provider>,
providers: HashSet<Provider>,
}

/// Returned if the iterator contained no providers.
Expand All @@ -416,6 +416,11 @@ impl Providers {
pub fn into_vec(self) -> Vec<Provider> {
self.providers.into_iter().collect()
}

/// Access the underlying set of [providers][`Provider`]
pub fn providers(&self) -> &HashSet<Provider> {
&self.providers
}
}

impl Match<Relay> for Providers {
Expand Down

0 comments on commit 3655554

Please sign in to comment.