diff options
author | Christian Duerr <chrisduerr@users.noreply.github.com> | 2019-03-30 16:48:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-30 16:48:36 +0000 |
commit | cfd025b5289bc305470a96657868c982a2b13bc2 (patch) | |
tree | 093b9105c881e28b909e031c46d2054016b643b3 /src/util.rs | |
parent | 91aa683bcd060b2ac2f621a388a6448f564d0537 (diff) | |
download | r-alacritty-cfd025b5289bc305470a96657868c982a2b13bc2.tar.gz r-alacritty-cfd025b5289bc305470a96657868c982a2b13bc2.tar.bz2 r-alacritty-cfd025b5289bc305470a96657868c982a2b13bc2.zip |
Add rustfmt style guide
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 |