summaryrefslogtreecommitdiffstats
path: root/vendor/itertools/src/grouping_map.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:11:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:12:43 +0000
commitcf94bdc0742c13e2a0cac864c478b8626b266e1b (patch)
tree044670aa50cc5e2b4229aa0b6b3df6676730c0a6 /vendor/itertools/src/grouping_map.rs
parentAdding debian version 1.65.0+dfsg1-2. (diff)
downloadrustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.tar.xz
rustc-cf94bdc0742c13e2a0cac864c478b8626b266e1b.zip
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/itertools/src/grouping_map.rs')
-rw-r--r--vendor/itertools/src/grouping_map.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/itertools/src/grouping_map.rs b/vendor/itertools/src/grouping_map.rs
index be22ec849..bb5b582c9 100644
--- a/vendor/itertools/src/grouping_map.rs
+++ b/vendor/itertools/src/grouping_map.rs
@@ -39,7 +39,6 @@ pub fn new<I, K, V>(iter: I) -> GroupingMap<I>
/// `GroupingMapBy` is an intermediate struct for efficient group-and-fold operations.
///
/// See [`GroupingMap`] for more informations.
-#[must_use = "GroupingMapBy is lazy and do nothing unless consumed"]
pub type GroupingMapBy<I, F> = GroupingMap<MapForGrouping<I, F>>;
/// `GroupingMap` is an intermediate struct for efficient group-and-fold operations.
@@ -290,7 +289,7 @@ impl<I, K, V> GroupingMap<I>
where F: FnMut(&K, &V) -> CK,
CK: Ord,
{
- self.max_by(|key, v1, v2| f(key, &v1).cmp(&f(key, &v2)))
+ self.max_by(|key, v1, v2| f(key, v1).cmp(&f(key, v2)))
}
/// Groups elements from the `GroupingMap` source by key and finds the minimum of each group.
@@ -368,7 +367,7 @@ impl<I, K, V> GroupingMap<I>
where F: FnMut(&K, &V) -> CK,
CK: Ord,
{
- self.min_by(|key, v1, v2| f(key, &v1).cmp(&f(key, &v2)))
+ self.min_by(|key, v1, v2| f(key, v1).cmp(&f(key, v2)))
}
/// Groups elements from the `GroupingMap` source by key and find the maximum and minimum of
@@ -481,7 +480,7 @@ impl<I, K, V> GroupingMap<I>
where F: FnMut(&K, &V) -> CK,
CK: Ord,
{
- self.minmax_by(|key, v1, v2| f(key, &v1).cmp(&f(key, &v2)))
+ self.minmax_by(|key, v1, v2| f(key, v1).cmp(&f(key, v2)))
}
/// Groups elements from the `GroupingMap` source by key and sums them.