]> git.proxmox.com Git - proxmox-backup.git/commitdiff
pxar: elide explicit lifetime
authorMaximiliano Sandoval <m.sandoval@proxmox.com>
Mon, 12 Feb 2024 13:17:34 +0000 (14:17 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Tue, 13 Feb 2024 09:21:35 +0000 (10:21 +0100)
Fixes the clippy lint

```
warning: the following explicit lifetimes could be elided: 'b
   --> pbs-client/src/pxar/create.rs:225:33
    |
225 |     fn archive_dir_contents<'a, 'b, T: SeqWrite + Send>(
    |                                 ^^
226 |         &'a mut self,
227 |         encoder: &'a mut Encoder<'b, T>,
    |                                  ^^
    |
    = 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
    |
225 ~     fn archive_dir_contents<'a, T: SeqWrite + Send>(
226 |         &'a mut self,
227 ~         encoder: &'a mut Encoder<'_, T>,
    |
```

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
pbs-client/src/pxar/create.rs

index e7053d9e3f703dbfa5838ce9e66aeff2e7deaf7c..3cf2b35a0049640a54a2589c242bcd0ace1aa8a7 100644 (file)
@@ -222,9 +222,9 @@ impl Archiver {
         }
     }
 
-    fn archive_dir_contents<'a, 'b, T: SeqWrite + Send>(
+    fn archive_dir_contents<'a, T: SeqWrite + Send>(
         &'a mut self,
-        encoder: &'a mut Encoder<'b, T>,
+        encoder: &'a mut Encoder<'_, T>,
         mut dir: Dir,
         is_root: bool,
     ) -> BoxFuture<'a, Result<(), Error>> {