fix: fix clippy
This commit is contained in:
@@ -51,10 +51,9 @@ fn main() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Err(_) = simple_logging::log_to_file("/var/log/keeprunningd.log", LevelFilter::Info) {
|
if simple_logging::log_to_file("/var/log/keeprunningd.log", LevelFilter::Info).is_err()
|
||||||
if let Err(_) = simple_logging::log_to_file("/tmp/keeprunningd.log", LevelFilter::Info) {
|
&& simple_logging::log_to_file("/tmp/keeprunningd.log", LevelFilter::Info).is_err() {
|
||||||
simple_logging::log_to_stderr(LevelFilter::Info);
|
simple_logging::log_to_stderr(LevelFilter::Info);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let keep_running_config = Arc::new(keep_running_config);
|
let keep_running_config = Arc::new(keep_running_config);
|
||||||
@@ -148,7 +147,7 @@ fn keep_runningd(keep_running_config: Arc<KeepRunningConfig>) {
|
|||||||
let mut restart_command_iter = restart_command.iter();
|
let mut restart_command_iter = restart_command.iter();
|
||||||
if let Some(program) = restart_command_iter.next() {
|
if let Some(program) = restart_command_iter.next() {
|
||||||
let mut cmd = Command::new(program);
|
let mut cmd = Command::new(program);
|
||||||
while let Some(arg) = restart_command_iter.next() {
|
for arg in restart_command_iter {
|
||||||
cmd.arg(arg);
|
cmd.arg(arg);
|
||||||
}
|
}
|
||||||
match cmd.spawn() {
|
match cmd.spawn() {
|
||||||
|
|||||||
Reference in New Issue
Block a user