public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox 1/8] rrd_map: remove unneded return statement
Date: Mon, 26 Aug 2024 14:15:29 +0200	[thread overview]
Message-ID: <20240826121536.287402-1-m.sandoval@proxmox.com> (raw)

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


             reply	other threads:[~2024-08-26 12:15 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-26 12:15 Maximiliano Sandoval [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240826121536.287402-1-m.sandoval@proxmox.com \
    --to=m.sandoval@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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