[pbs-devel] [PATCH proxmox v2 14/18] acme: elide explicit lifetimes

Maximiliano Sandoval m.sandoval at proxmox.com
Wed Jun 26 14:43:42 CEST 2024


Fixes the clippy warning:

warning: the following explicit lifetimes could be elided: 'a
  --> proxmox-acme/src/async_client.rs:65:30
   |
65 |     pub async fn new_account<'a>(
   |                              ^^
66 |         &'a mut self,
   |          ^^
   |
   = 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

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 proxmox-acme/src/async_client.rs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/proxmox-acme/src/async_client.rs b/proxmox-acme/src/async_client.rs
index 51365c7e..ce5a6c79 100644
--- a/proxmox-acme/src/async_client.rs
+++ b/proxmox-acme/src/async_client.rs
@@ -62,13 +62,13 @@ impl AcmeClient {
     ///
     /// If an RSA key size is provided, an RSA key will be generated. Otherwise an EC key using the
     /// P-256 curve will be generated.
-    pub async fn new_account<'a>(
-        &'a mut self,
+    pub async fn new_account(
+        &mut self,
         tos_agreed: bool,
         contact: Vec<String>,
         rsa_bits: Option<u32>,
         eab_creds: Option<(String, String)>,
-    ) -> Result<&'a Account, anyhow::Error> {
+    ) -> Result<&Account, anyhow::Error> {
         let mut account = Account::creator()
             .set_contacts(contact)
             .agree_to_tos(tos_agreed);
-- 
2.39.2





More information about the pbs-devel mailing list