diff options
Diffstat (limited to 'src/daemon.rs')
-rw-r--r-- | src/daemon.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/daemon.rs b/src/daemon.rs index 8bf8adb..10c197c 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -84,7 +84,7 @@ impl DaemonManager { info!("start daemon: {:?}", argv); let pid = NamedTempFile::new()?; let output = Command::new("daemonize") - .args(&[ + .args([ "-c", "/", "-e", @@ -134,13 +134,9 @@ impl DaemonManager { if !cmd.is_empty() { cmd.push(' '); } - cmd.push_str( - &String::from_utf8_lossy(arg.as_bytes()) - .to_owned() - .to_string(), - ); + cmd.push_str(String::from_utf8_lossy(arg.as_bytes()).to_string().as_ref()); } - let err = read(&stderr).map_err(DaemonError::Stderr)?; + let err = read(stderr).map_err(DaemonError::Stderr)?; let err = String::from_utf8_lossy(&err).into_owned(); Err(DaemonError::Timeout(self.timeout.as_millis(), cmd, err)) } |