diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-01-25 10:13:12 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-01-25 10:13:12 +0100 |
| commit | 12fb13374a022cee7076d985c3f2fe575a0af5b6 (patch) | |
| tree | 4c189a8b09b0c12369c0cc48ef9546639d61d211 /src/process | |
| parent | 789b2ff929cf567cbf89628e487f656e00f08e3a (diff) | |
| parent | e6641f1c6f4b0220bb1b607b8cd04d3531fb1392 (diff) | |
| download | mullvadvpn-12fb13374a022cee7076d985c3f2fe575a0af5b6.tar.xz mullvadvpn-12fb13374a022cee7076d985c3f2fe575a0af5b6.zip | |
Merge branch 'rustfmt-upgrade'
Diffstat (limited to 'src/process')
| -rw-r--r-- | src/process/mod.rs | 5 | ||||
| -rw-r--r-- | src/process/monitor.rs | 6 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/process/mod.rs b/src/process/mod.rs index 52d4229d17..fae68616c8 100644 --- a/src/process/mod.rs +++ b/src/process/mod.rs @@ -8,11 +8,10 @@ use std::process::{Command, Child, Stdio, ChildStdout, ChildStderr}; /// A module for monitoring child processes and get notified of events on them. pub mod monitor; +use self::monitor::{MonitoredChild, ChildSpawner}; use clonablechild::{ClonableChild, ChildExt}; -use self::monitor::{MonitoredChild, ChildSpawner}; - /// An OpenVPN process builder, providing control over the different arguments that the OpenVPN /// binary accepts. pub struct OpenVpnCommand { @@ -148,9 +147,9 @@ impl ChildSpawner<ClonableChild> for OpenVpnCommand { #[cfg(test)] mod tests { + use super::OpenVpnCommand; use net::RemoteAddr; use std::ffi::OsString; - use super::OpenVpnCommand; #[test] fn no_arguments() { diff --git a/src/process/monitor.rs b/src/process/monitor.rs index 2b88271ca9..b2080b93de 100644 --- a/src/process/monitor.rs +++ b/src/process/monitor.rs @@ -135,9 +135,7 @@ fn spawn_state_machine<C, B>(builder: B) -> Sender<MonitorMsg> { let state_machine = StateMachine::new(builder); let tx = state_machine.get_handle(); - thread::spawn(move || { - state_machine.run(); - }); + thread::spawn(move || { state_machine.run(); }); tx } @@ -295,13 +293,13 @@ impl Drop for ChildMonitor { #[cfg(test)] mod child_monitor { + use super::*; use std::io; use std::process::{ChildStdout, ChildStderr}; use std::sync::{Arc, Mutex}; use std::sync::mpsc::{self, Sender, Receiver}; use std::thread; use std::time::Duration; - use super::*; #[derive(Clone)] struct MockChild { |
