]> git.proxmox.com Git - proxmox-offline-mirror.git/commitdiff
verifier: elide explicit lifetime
authorMaximiliano Sandoval <m.sandoval@proxmox.com>
Wed, 14 Feb 2024 09:27:30 +0000 (10:27 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 21 Feb 2024 11:13:33 +0000 (12:13 +0100)
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

index 17d36eb650feb2eee6c8e37f78eea610fe9ffc13..ed986afe7f1057837d686f6a4e12e6f0e1eb8f7d 100644 (file)
@@ -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,