Skip to content

Commit ca137db

Browse files
committed
Changed trait bounds
1 parent 5e24347 commit ca137db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

library/core/src/iter/traits/iterator.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,7 @@ pub trait Iterator {
17151715
fn dedup(self) -> Dedup<Self, Self::Item>
17161716
where
17171717
Self: Sized,
1718+
Self::Item: PartialEq,
17181719
{
17191720
Dedup::new(self)
17201721
}
@@ -1747,7 +1748,7 @@ pub trait Iterator {
17471748
fn dedup_by<F>(self, same_bucket: F) -> DedupBy<Self, F, Self::Item>
17481749
where
17491750
Self: Sized,
1750-
F: Fn(&Self::Item, &Self::Item) -> bool,
1751+
F: FnMut(&Self::Item, &Self::Item) -> bool,
17511752
{
17521753
DedupBy::new(self, same_bucket)
17531754
}
@@ -1777,7 +1778,7 @@ pub trait Iterator {
17771778
fn dedup_by_key<F, K>(self, key: F) -> DedupByKey<Self, F, Self::Item>
17781779
where
17791780
Self: Sized,
1780-
F: Fn(&Self::Item) -> K,
1781+
F: FnMut(&Self::Item) -> K,
17811782
K: PartialEq,
17821783
{
17831784
DedupByKey::new(self, key)

0 commit comments

Comments
 (0)