public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox 1/8] rrd_map: remove unneded return statement
@ 2024-08-26 12:15 Maximiliano Sandoval
  2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 2/8] rrd_map: remove unnecessary use of get().is_some() Maximiliano Sandoval
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Maximiliano Sandoval @ 2024-08-26 12:15 UTC (permalink / raw)
  To: pbs-devel

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@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



_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-08-28 11:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-26 12:15 [pbs-devel] [PATCH proxmox 1/8] rrd_map: remove unneded return statement Maximiliano Sandoval
2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 2/8] rrd_map: remove unnecessary use of get().is_some() Maximiliano Sandoval
2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 3/8] router: completion: remove needles borrow Maximiliano Sandoval
2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 4/8] apt: cache_api: simplify match with unwrap_or_default Maximiliano Sandoval
2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 5/8] apt: sources_parser: remove needless borrow Maximiliano Sandoval
2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 6/8] access-control: acl: add indentation to docs Maximiliano Sandoval
2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 7/8] section-config: fix link to section_config Maximiliano Sandoval
2024-08-26 12:15 ` [pbs-devel] [PATCH proxmox 8/8] section-config: fix link to SectionConfigData Maximiliano Sandoval
2024-08-28 11:21 ` [pbs-devel] applied-series: [PATCH proxmox 1/8] rrd_map: remove unneded return statement Wolfgang Bumiller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal