diff --git a/src/tools/systemd/time.rs b/src/tools/systemd/time.rs index 0d114eb8..8bb2a8f7 100644 --- a/src/tools/systemd/time.rs +++ b/src/tools/systemd/time.rs @@ -181,12 +181,11 @@ pub fn compute_next_event( { // try next day t.add_days(n - day_num, true)?; - continue; } else { // try next week t.add_days(7 - day_num, true)?; - continue; } + continue; } } @@ -197,12 +196,11 @@ pub fn compute_next_event( if let Some(n) = DateTimeValue::find_next(&event.hour, hour) { // test next hour t.set_time(n as libc::c_int, 0, 0)?; - continue; } else { // test next day t.add_days(1, true)?; - continue; } + continue; } } @@ -213,12 +211,11 @@ pub fn compute_next_event( if let Some(n) = DateTimeValue::find_next(&event.minute, minute) { // test next minute t.set_min_sec(n as libc::c_int, 0)?; - continue; } else { // test next hour t.set_time(t.hour() + 1, 0, 0)?; - continue; } + continue; } } @@ -229,12 +226,11 @@ pub fn compute_next_event( if let Some(n) = DateTimeValue::find_next(&event.second, second) { // test next second t.set_sec(n as libc::c_int)?; - continue; } else { // test next min t.set_min_sec(t.min() + 1, 0)?; - continue; } + continue; } }