diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2018-07-30 13:23:17 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2018-07-30 13:23:17 +0200 |
| commit | 6b794ac1b3454d08a8efea71e912b4e7cbc6c9ee (patch) | |
| tree | cbd0ff3968aad4d897e5daf2c10bd46c34d03d12 /mullvad-daemon/src | |
| parent | a9270436ab85bc01eb3313d72ce231008676d7f0 (diff) | |
| download | mullvadvpn-6b794ac1b3454d08a8efea71e912b4e7cbc6c9ee.tar.xz mullvadvpn-6b794ac1b3454d08a8efea71e912b4e7cbc6c9ee.zip | |
Reformat with rustfmt 0.9.0
Diffstat (limited to 'mullvad-daemon/src')
| -rw-r--r-- | mullvad-daemon/src/main.rs | 3 | ||||
| -rw-r--r-- | mullvad-daemon/src/relays.rs | 3 | ||||
| -rw-r--r-- | mullvad-daemon/src/rpc_address_file.rs | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/mullvad-daemon/src/main.rs b/mullvad-daemon/src/main.rs index d9df085654..db322d8155 100644 --- a/mullvad-daemon/src/main.rs +++ b/mullvad-daemon/src/main.rs @@ -484,8 +484,7 @@ impl Daemon { .join( self.version_proxy .is_app_version_supported(¤t_version), - ) - .map(|(latest_versions, is_supported)| AppVersionInfo { + ).map(|(latest_versions, is_supported)| AppVersionInfo { current_is_supported: is_supported, latest: latest_versions, }); diff --git a/mullvad-daemon/src/relays.rs b/mullvad-daemon/src/relays.rs index 44a2e67084..ef81adc4fa 100644 --- a/mullvad-daemon/src/relays.rs +++ b/mullvad-daemon/src/relays.rs @@ -315,8 +315,7 @@ impl RelaySelector { .find(|relay| { i = i.saturating_sub(relay.weight); i == 0 - }) - .unwrap(), + }).unwrap(), ) } } diff --git a/mullvad-daemon/src/rpc_address_file.rs b/mullvad-daemon/src/rpc_address_file.rs index b3d3656a04..d0df2c1919 100644 --- a/mullvad-daemon/src/rpc_address_file.rs +++ b/mullvad-daemon/src/rpc_address_file.rs @@ -35,7 +35,8 @@ pub fn write(rpc_address: &str, shared_secret: &str) -> Result<()> { // Avoids opening an existing file owned by another user and writing sensitive data to it. remove()?; - let file_path = mullvad_paths::get_rpc_address_path().chain_err(|| ErrorKind::UnknownFilePath)?; + let file_path = + mullvad_paths::get_rpc_address_path().chain_err(|| ErrorKind::UnknownFilePath)?; if let Some(parent_dir) = file_path.parent() { fs::create_dir_all(parent_dir) @@ -52,7 +53,8 @@ pub fn write(rpc_address: &str, shared_secret: &str) -> Result<()> { /// Removes the RPC file, if it exists. pub fn remove() -> Result<()> { - let file_path = mullvad_paths::get_rpc_address_path().chain_err(|| ErrorKind::UnknownFilePath)?; + let file_path = + mullvad_paths::get_rpc_address_path().chain_err(|| ErrorKind::UnknownFilePath)?; if let Err(error) = fs::remove_file(&file_path) { if error.kind() == io::ErrorKind::NotFound { |
