public inbox for pbs-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: Proxmox Backup Server development discussion
	<pbs-devel@lists.proxmox.com>
Subject: Re: [pbs-devel] [PATCH backup 5/6] chunk_store: do not explicitly write implied trait
Date: Wed, 26 Jun 2024 12:01:11 +0200	[thread overview]
Message-ID: <20240626100111.txmaptrgujbwsfoo@luna.proxmox.com> (raw)
In-Reply-To: <20240626094822.288287-5-m.sandoval@proxmox.com>

On 26.06.2024 11:48, Maximiliano Sandoval wrote:
>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 | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/pbs-datastore/src/chunk_store.rs b/pbs-datastore/src/chunk_store.rs
>index 9f6289c9..b97fcb68 100644
>--- a/pbs-datastore/src/chunk_store.rs
>+++ b/pbs-datastore/src/chunk_store.rs
>@@ -251,8 +251,7 @@ impl ChunkStore {
>     pub fn get_chunk_iterator(
>         &self,
>     ) -> Result<
>-        impl Iterator<Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool)>
>-            + std::iter::FusedIterator,
>+        impl Iterator<Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool)>,
>         Error,
>     > {
>         // unwrap: only `None` in unit tests

This one is wrong, the FusedIterator is removed here.
Correct is:

     impl std::iter::FusedIterator<Item = (Result<proxmox_sys::fs::ReadDirEntry, Error>, usize, bool)>,

The other changes look good to me!


_______________________________________________
pbs-devel mailing list
pbs-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel




  reply	other threads:[~2024-06-26 10:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-26  9:48 [pbs-devel] [PATCH backup 1/6] replace get(key).is_some() with contains_key() Maximiliano Sandoval
2024-06-26  9:48 ` [pbs-devel] [PATCH backup 2/6] replace get(key).is_none() with !contains_key() Maximiliano Sandoval
2024-06-26  9:48 ` [pbs-devel] [PATCH backup 3/6] api: remove use of unnecessary pub(self) Maximiliano Sandoval
2024-06-26  9:48 ` [pbs-devel] [PATCH backup 4/6] tools: write multiplication by 01 succinctly Maximiliano Sandoval
2024-06-26  9:48 ` [pbs-devel] [PATCH backup 5/6] chunk_store: do not explicitly write implied trait Maximiliano Sandoval
2024-06-26 10:01   ` Gabriel Goller [this message]
2024-06-26  9:48 ` [pbs-devel] [PATCH backup 6/6] tools: add missing cfg(test) macro Maximiliano Sandoval

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240626100111.txmaptrgujbwsfoo@luna.proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal