From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ronja.mits.lan by ronja.mits.lan with LMTP id sGQcAUnxe2b2SQAAxxbTJA (envelope-from ); Wed, 26 Jun 2024 12:45:29 +0200 Received: from proxmox-new.maurer-it.com (unknown [192.168.2.33]) by ronja.mits.lan (Postfix) with ESMTPS id E4BABF63AFC; Wed, 26 Jun 2024 12:45:28 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id CA8DA48733; Wed, 26 Jun 2024 12:45:28 +0200 (CEST) Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by proxmox-new.maurer-it.com (Proxmox) with ESMTPS; Wed, 26 Jun 2024 12:45:27 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1852F1E045; Wed, 26 Jun 2024 12:45:23 +0200 (CEST) From: Maximiliano Sandoval To: pbs-devel@lists.proxmox.com Date: Wed, 26 Jun 2024 12:45:05 +0200 Message-Id: <20240626104514.384718-9-m.sandoval@proxmox.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240626104514.384718-1-m.sandoval@proxmox.com> References: <20240626104514.384718-1-m.sandoval@proxmox.com> MIME-Version: 1.0 Subject: [pbs-devel] [PATCH proxmox 09/18] remove unneeded returns X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" X-SPAM-LEVEL: Spam detection results: 0 DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods MAILING_LIST_MULTI -2 Multiple indicators imply a widely-seen list manager RAZOR2_CF_RANGE_51_100 2.43 Razor2 gives confidence level above 50% RAZOR2_CHECK 1.729 Listed in Razor2 (http://razor.sf.net/) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Fixes the clippy warning: warning: unneeded `return` statement --> proxmox-tfa/src/api/mod.rs:468:17 | 468 | / return TfaResult::Failure { 469 | | needs_saving: true, 470 | | tfa_limit_reached, 471 | | totp_limit_reached, 472 | | }; | |_________________^ | = 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` | 468 ~ TfaResult::Failure { 469 + needs_saving: true, 470 + tfa_limit_reached, 471 + totp_limit_reached, 472 ~ } | Signed-off-by: Maximiliano Sandoval --- proxmox-notify/src/context/pbs.rs | 2 +- proxmox-notify/src/context/pve.rs | 2 +- proxmox-tfa/src/api/mod.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proxmox-notify/src/context/pbs.rs b/proxmox-notify/src/context/pbs.rs index 2de305f5..09c555e4 100644 --- a/proxmox-notify/src/context/pbs.rs +++ b/proxmox-notify/src/context/pbs.rs @@ -101,7 +101,7 @@ impl Context for PBSContext { } fn default_config(&self) -> &'static str { - return DEFAULT_CONFIG; + DEFAULT_CONFIG } fn lookup_template( diff --git a/proxmox-notify/src/context/pve.rs b/proxmox-notify/src/context/pve.rs index 647f7c89..d49ab27c 100644 --- a/proxmox-notify/src/context/pve.rs +++ b/proxmox-notify/src/context/pve.rs @@ -51,7 +51,7 @@ impl Context for PVEContext { } fn default_config(&self) -> &'static str { - return DEFAULT_CONFIG; + DEFAULT_CONFIG } fn lookup_template( diff --git a/proxmox-tfa/src/api/mod.rs b/proxmox-tfa/src/api/mod.rs index 1437aa1b..7f4bbb31 100644 --- a/proxmox-tfa/src/api/mod.rs +++ b/proxmox-tfa/src/api/mod.rs @@ -465,11 +465,11 @@ impl TfaConfig { Some(proxmox_time::epoch_i64() + access.tfa_failure_lock_time()); } - return TfaResult::Failure { + TfaResult::Failure { needs_saving: true, tfa_limit_reached, totp_limit_reached, - }; + } } } } -- 2.39.2 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel