diff options
author | Lars Wirzenius <liw@liw.fi> | 2024-03-15 05:45:50 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2024-03-15 05:45:50 +0000 |
commit | d19841b087996784f1437a743a6916a443f4911b (patch) | |
tree | 93dff6e69da88b75b6b3bdb74a6eee22cef08280 /src/daemon.rs | |
parent | ed1c8990707b451580e45aea0169b9a82fe739f2 (diff) | |
parent | f29c6e680baefec5289d4fb75d7bf96118b62d84 (diff) | |
download | obnam-benchmark-d19841b087996784f1437a743a6916a443f4911b.tar.gz |
fixes
See merge request obnam/obnam-benchmark!16
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)) } |