diff options
Diffstat (limited to 'src/util.rs')
-rw-r--r-- | src/util.rs | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/util.rs b/src/util.rs index 4532d2e4..06e8436d 100644 --- a/src/util.rs +++ b/src/util.rs @@ -12,10 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::{cmp, io}; use std::ffi::OsStr; use std::process::Command; use std::process::Stdio; +use std::{cmp, io}; #[cfg(not(windows))] use std::os::unix::process::CommandExt; @@ -35,10 +35,7 @@ pub mod thread { T: Send + 'static, S: Into<String>, { - ::std::thread::Builder::new() - .name(name.into()) - .spawn(f) - .expect("thread spawn works") + ::std::thread::Builder::new().name(name.into()).spawn(f).expect("thread spawn works") } pub use std::thread::*; @@ -87,9 +84,9 @@ pub mod fmt { #[cfg(not(windows))] pub fn start_daemon<I, S>(program: &str, args: I) -> io::Result<()> - where - I: IntoIterator<Item = S>, - S: AsRef<OsStr>, +where + I: IntoIterator<Item = S>, + S: AsRef<OsStr>, { Command::new(program) .args(args) @@ -109,9 +106,9 @@ pub fn start_daemon<I, S>(program: &str, args: I) -> io::Result<()> #[cfg(windows)] pub fn start_daemon<I, S>(program: &str, args: I) -> io::Result<()> - where - I: IntoIterator<Item = S>, - S: AsRef<OsStr>, +where + I: IntoIterator<Item = S>, + S: AsRef<OsStr>, { // Setting all the I/O handles to null and setting the // CREATE_NEW_PROCESS_GROUP and CREATE_NO_WINDOW has the effect |