]> git.proxmox.com Git - proxmox-backup.git/commitdiff
chunk_store: do not explicitly write implied trait
authorMaximiliano Sandoval <m.sandoval@proxmox.com>
Wed, 26 Jun 2024 13:06:02 +0000 (15:06 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 28 Jun 2024 07:21:06 +0000 (09:21 +0200)
Fixes the clippy warning:

warning: this bound is already specified as the supertrait of `std::iter::FusedIterator`
   --> pbs-datastore/src/chunk_store.rs:254:14
    |
254 |         impl Iterator<Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool)>
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implied_bounds_in_impls
    = note: `#[warn(clippy::implied_bounds_in_impls)]` on by default
help: try removing this bound
    |
254 -         impl Iterator<Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool)>
255 -             + std::iter::FusedIterator,
254 +         impl std::iter::FusedIterator<Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool)>,

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
pbs-datastore/src/chunk_store.rs

index 9f6289c9fa743a3d74f77b1761535aee1072bf95..0217be843026f9b72da9e10f03c413f863fcd1cf 100644 (file)
@@ -251,8 +251,9 @@ impl ChunkStore {
     pub fn get_chunk_iterator(
         &self,
     ) -> Result<
-        impl Iterator<Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool)>
-            + std::iter::FusedIterator,
+        impl std::iter::FusedIterator<
+            Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool),
+        >,
         Error,
     > {
         // unwrap: only `None` in unit tests