From: Maximiliano Sandoval <m.sandoval@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH offline-mirror 2/2] verifier: elide explicit lifetime
Date: Wed, 14 Feb 2024 10:27:30 +0100 [thread overview]
Message-ID: <20240214092730.168795-2-m.sandoval@proxmox.com> (raw)
In-Reply-To: <20240214092730.168795-1-m.sandoval@proxmox.com>
Fixes the clippy lint:
```
warning: the following explicit lifetimes could be elided: 'msg
--> src/helpers/verifier.rs:93:32
|
93 | pub(crate) fn verify_signature<'msg>(
| ^^^^
94 | msg: &'msg [u8],
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
93 ~ pub(crate) fn verify_signature(
94 ~ msg: &[u8],
|
```
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
---
src/helpers/verifier.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/helpers/verifier.rs b/src/helpers/verifier.rs
index 17d36eb..ed986af 100644
--- a/src/helpers/verifier.rs
+++ b/src/helpers/verifier.rs
@@ -90,8 +90,8 @@ impl<'a> VerificationHelper for Helper<'a> {
}
/// Verifies GPG-signed `msg` was signed by `key`, returning the verified data without signature.
-pub(crate) fn verify_signature<'msg>(
- msg: &'msg [u8],
+pub(crate) fn verify_signature(
+ msg: &[u8],
key: &[u8],
detached_sig: Option<&[u8]>,
weak_crypto: &WeakCryptoConfig,
--
2.39.2
next prev parent reply other threads:[~2024-02-14 9:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-14 9:27 [pbs-devel] [PATCH offline-mirror 1/2] remove needless borrows Maximiliano Sandoval
2024-02-14 9:27 ` Maximiliano Sandoval [this message]
2024-02-21 11:14 ` [pbs-devel] applied-series: " Thomas Lamprecht
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=20240214092730.168795-2-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