Skip to content

Commit ca28006

Browse files
committed
Do not put #[must_use] on type alias
As warned by the compiler, it has no effect.
1 parent 1f73b56 commit ca28006

File tree

5 files changed

+1
-7
lines changed

5 files changed

+1
-7
lines changed

src/adaptors/coalesce.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::iter::FusedIterator;
33

44
use crate::size_hint;
55

6+
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
67
pub struct CoalesceBy<I, F, T>
78
where
89
I: Iterator,
@@ -86,7 +87,6 @@ impl<I: Iterator, F: CoalescePredicate<I::Item, T>, T> FusedIterator for Coalesc
8687
/// An iterator adaptor that may join together adjacent elements.
8788
///
8889
/// See [`.coalesce()`](crate::Itertools::coalesce) for more information.
89-
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
9090
pub type Coalesce<I, F> = CoalesceBy<I, F, <I as Iterator>::Item>;
9191

9292
impl<F, Item, T> CoalescePredicate<Item, T> for F
@@ -113,7 +113,6 @@ where
113113
/// An iterator adaptor that removes repeated duplicates, determining equality using a comparison function.
114114
///
115115
/// See [`.dedup_by()`](crate::Itertools::dedup_by) or [`.dedup()`](crate::Itertools::dedup) for more information.
116-
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
117116
pub type DedupBy<I, Pred> = CoalesceBy<I, DedupPred2CoalescePred<Pred>, <I as Iterator>::Item>;
118117

119118
#[derive(Clone)]
@@ -186,7 +185,6 @@ where
186185
///
187186
/// See [`.dedup_by_with_count()`](crate::Itertools::dedup_by_with_count) or
188187
/// [`.dedup_with_count()`](crate::Itertools::dedup_with_count) for more information.
189-
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
190188
pub type DedupByWithCount<I, Pred> =
191189
CoalesceBy<I, DedupPredWithCount2CoalescePred<Pred>, (usize, <I as Iterator>::Item)>;
192190

src/adaptors/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,6 @@ impl<T: PartialOrd> MergePredicate<T> for MergeLte {
490490
/// Iterator element type is `I::Item`.
491491
///
492492
/// See [`.merge()`](crate::Itertools::merge_by) for more information.
493-
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
494493
pub type Merge<I, J> = MergeBy<I, J, MergeLte>;
495494

496495
/// Create an iterator that merges elements in `i` and `j`.

src/duplicates_impl.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,6 @@ mod private {
188188
/// An iterator adapter to filter for duplicate elements.
189189
///
190190
/// See [`.duplicates_by()`](crate::Itertools::duplicates_by) for more information.
191-
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
192191
pub type DuplicatesBy<I, V, F> = private::DuplicatesBy<I, V, private::ByFn<F>>;
193192

194193
/// Create a new `DuplicatesBy` iterator.

src/grouping_map.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ pub fn new<I, K, V>(iter: I) -> GroupingMap<I>
3939
/// `GroupingMapBy` is an intermediate struct for efficient group-and-fold operations.
4040
///
4141
/// See [`GroupingMap`] for more informations.
42-
#[must_use = "GroupingMapBy is lazy and do nothing unless consumed"]
4342
pub type GroupingMapBy<I, F> = GroupingMap<MapForGrouping<I, F>>;
4443

4544
/// `GroupingMap` is an intermediate struct for efficient group-and-fold operations.

src/kmerge_impl.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ fn sift_down<T, S>(heap: &mut [T], index: usize, mut less_than: S)
104104
/// Iterator element type is `I::Item`.
105105
///
106106
/// See [`.kmerge()`](crate::Itertools::kmerge) for more information.
107-
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
108107
pub type KMerge<I> = KMergeBy<I, KMergeByLt>;
109108

110109
pub trait KMergePredicate<T> {

0 commit comments

Comments
 (0)