[pbs-devel] [PATCH proxmox 1/8] rrd_map: remove unneded return statement

Maximiliano Sandoval m.sandoval at proxmox.com
Mon Aug 26 14:15:29 CEST 2024


Fixes:

warning: unneeded `return` statement
   --> proxmox-rrd/src/cache/rrd_map.rs:117:13
    |
117 |             return Ok(true);
    |             ^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
    = note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
    |
117 -             return Ok(true);
117 +             Ok(true)
    |

warning: unneeded `return` statement
   --> proxmox-rrd/src/cache/rrd_map.rs:119:13
    |
119 |             return Ok(false);
    |             ^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
    |
119 -             return Ok(false);
119 +             Ok(false)

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxmox-rrd/src/cache/rrd_map.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/proxmox-rrd/src/cache/rrd_map.rs b/proxmox-rrd/src/cache/rrd_map.rs
index fa9eaa1f..7fe19ccb 100644
--- a/proxmox-rrd/src/cache/rrd_map.rs
+++ b/proxmox-rrd/src/cache/rrd_map.rs
@@ -114,9 +114,9 @@ impl RRDMap {
 
         if let Some(rrd) = (self.load_rrd_cb)(&path, rel_path) {
             self.map.insert(rel_path.to_string(), rrd);
-            return Ok(true);
+            Ok(true)
         } else {
-            return Ok(false);
+            Ok(false)
         }
     }
 }
-- 
2.39.2





More information about the pbs-devel mailing list