[pbs-devel] [PATCH offline-mirror 2/2] verifier: elide explicit lifetime
Maximiliano Sandoval
m.sandoval at proxmox.com
Wed Feb 14 10:27:30 CET 2024
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 at 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
More information about the pbs-devel
mailing list