summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--mullvad-daemon/src/settings.rs19
1 files changed, 7 insertions, 12 deletions
diff --git a/mullvad-daemon/src/settings.rs b/mullvad-daemon/src/settings.rs
index 10cf63123a..cb9c0daabb 100644
--- a/mullvad-daemon/src/settings.rs
+++ b/mullvad-daemon/src/settings.rs
@@ -111,11 +111,13 @@ impl Settings {
account_token = None;
}
if account_token != self.account_token {
- info!(
- "Changing account token from {} to {}",
- Self::format_account_token(&self.account_token),
- Self::format_account_token(&account_token),
- );
+ if account_token.is_none() {
+ info!("Unsetting account token");
+ } else if self.account_token.is_none() {
+ info!("Setting account token");
+ } else {
+ info!("Changing account token")
+ }
self.account_token = account_token;
self.save().map(|_| true)
} else {
@@ -123,13 +125,6 @@ impl Settings {
}
}
- fn format_account_token(account_token: &Option<String>) -> String {
- match *account_token {
- Some(ref account_token) => format!("\"{}\"", account_token),
- None => "[none]".to_owned(),
- }
- }
-
pub fn get_relay_constraints(&self) -> RelayConstraints {
self.relay_constraints.clone()
}