summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2018-12-03 13:32:01 +0100
committerLinus Färnstrand <linus@mullvad.net>2018-12-03 13:32:01 +0100
commita63ceeb73b8c935218c2b137b434d79d34163c3f (patch)
treeea188f1744991af11705252e66fe168e7ef3b2b2
parent7907b8664b25da7fb1ebea0ff17e4c9d4aa5aee8 (diff)
downloadmullvadvpn-a63ceeb73b8c935218c2b137b434d79d34163c3f.tar.xz
mullvadvpn-a63ceeb73b8c935218c2b137b434d79d34163c3f.zip
Activate the use_field_init_shorthand rustfmt option
-rw-r--r--mullvad-daemon/src/logging.rs2
-rw-r--r--mullvad-daemon/src/system_service.rs4
-rw-r--r--rustfmt.toml1
-rw-r--r--talpid-core/src/mpsc.rs2
4 files changed, 5 insertions, 4 deletions
diff --git a/mullvad-daemon/src/logging.rs b/mullvad-daemon/src/logging.rs
index 3f8f4f59dc..5c15690bfb 100644
--- a/mullvad-daemon/src/logging.rs
+++ b/mullvad-daemon/src/logging.rs
@@ -74,7 +74,7 @@ pub fn init_logger(
}
let stdout_formatter = Formatter {
- output_timestamp: output_timestamp,
+ output_timestamp,
output_color: true,
};
let stdout_dispatcher = fern::Dispatch::new()
diff --git a/mullvad-daemon/src/system_service.rs b/mullvad-daemon/src/system_service.rs
index d98fcfaaeb..96aaf75d03 100644
--- a/mullvad-daemon/src/system_service.rs
+++ b/mullvad-daemon/src/system_service.rs
@@ -186,9 +186,9 @@ impl PersistentServiceStatus {
service_type: SERVICE_TYPE,
current_state: next_state,
controls_accepted: accepted_controls_by_state(next_state),
- exit_code: exit_code,
+ exit_code,
checkpoint: checkpoint as u32,
- wait_hint: wait_hint,
+ wait_hint,
};
log::debug!(
diff --git a/rustfmt.toml b/rustfmt.toml
index f9181e438c..c061bec008 100644
--- a/rustfmt.toml
+++ b/rustfmt.toml
@@ -1,5 +1,6 @@
# Activation of features, almost objectively better ;)
use_try_shorthand = true
+use_field_init_shorthand = true
condense_wildcard_suffixes = true
normalize_comments = true
wrap_comments = true
diff --git a/talpid-core/src/mpsc.rs b/talpid-core/src/mpsc.rs
index 533dd857c1..c8e5b7449d 100644
--- a/talpid-core/src/mpsc.rs
+++ b/talpid-core/src/mpsc.rs
@@ -24,7 +24,7 @@ where
{
fn from(sender: mpsc::Sender<U>) -> Self {
IntoSender {
- sender: sender,
+ sender,
_marker: PhantomData,
}
}