summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2021-09-16 11:40:00 +0200
committerDavid Lönnhager <david.l@mullvad.net>2021-09-16 17:37:08 +0200
commit8de9567f58b509e52bd5b37ea103143926484a8a (patch)
tree15bb580c4ff0bc22e2769870def8c4a3a83ea427
parent77059fe86dbf06ad0037335a6a798ccbfcf1f8f4 (diff)
downloadmullvadvpn-8de9567f58b509e52bd5b37ea103143926484a8a.tar.xz
mullvadvpn-8de9567f58b509e52bd5b37ea103143926484a8a.zip
Fix display impl for BridgeConstraints
-rw-r--r--mullvad-types/src/relay_constraints.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/mullvad-types/src/relay_constraints.rs b/mullvad-types/src/relay_constraints.rs
index d1d3a87f71..09716c5fa3 100644
--- a/mullvad-types/src/relay_constraints.rs
+++ b/mullvad-types/src/relay_constraints.rs
@@ -566,8 +566,13 @@ pub struct BridgeConstraints {
impl fmt::Display for BridgeConstraints {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
match self.location {
- Constraint::Any => write!(f, "any location"),
- Constraint::Only(ref location_constraint) => location_constraint.fmt(f),
+ Constraint::Any => write!(f, "any location")?,
+ Constraint::Only(ref location_constraint) => location_constraint.fmt(f)?,
+ }
+ write!(f, " using ")?;
+ match self.providers {
+ Constraint::Any => write!(f, "any provider"),
+ Constraint::Only(ref constraint) => constraint.fmt(f),
}
}
}