]> git.proxmox.com Git - pmg-log-tracker.git/commitdiff
code cleanup: avoid some bload on match return
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 13 Jul 2022 09:46:19 +0000 (11:46 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 13 Jul 2022 09:46:19 +0000 (11:46 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/main.rs

index 12967ec921f8365384ae48a10a898922e2bf599d..7a787686a19518d92e5d2d1786bdcc2013594e15 100644 (file)
@@ -2276,9 +2276,7 @@ fn parse_time(data: &'_ [u8], cur_year: i64, cur_month: i64) -> Option<(time_t,
 
     let (mday, data) = match parse_number(data, 2) {
         Some(t) => t,
-        None => {
-            return None;
-        }
+        None => return None,
     };
     if mday == 0 {
         return None;
@@ -2294,9 +2292,7 @@ fn parse_time(data: &'_ [u8], cur_year: i64, cur_month: i64) -> Option<(time_t,
 
     let (hour, data) = match parse_number(data, 2) {
         Some(t) => t,
-        None => {
-            return None;
-        }
+        None => return None,
     };
 
     ltime *= 24;
@@ -2313,9 +2309,7 @@ fn parse_time(data: &'_ [u8], cur_year: i64, cur_month: i64) -> Option<(time_t,
 
     let (min, data) = match parse_number(data, 2) {
         Some(t) => t,
-        None => {
-            return None;
-        }
+        None => return None,
     };
 
     ltime *= 60;
@@ -2332,9 +2326,7 @@ fn parse_time(data: &'_ [u8], cur_year: i64, cur_month: i64) -> Option<(time_t,
 
     let (sec, data) = match parse_number(data, 2) {
         Some(t) => t,
-        None => {
-            return None;
-        }
+        None => return None,
     };
 
     ltime *= 60;