Skip to content

Commit 7465a4c

Browse files
committed
fix clippy::redundant_closure_for_method_calls
1 parent a353e72 commit 7465a4c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/adaptors/multi_product.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ impl<I> MultiProduct<I>
114114
/// Returns true if iteration has started and has not yet finished; false
115115
/// otherwise.
116116
fn in_progress(&self) -> bool {
117-
self.0.last().map_or(false, |last| last.in_progress())
117+
self.0.last().map_or(false, MultiProductIter::in_progress)
118118
}
119119
}
120120

src/groupbylazy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ impl<K, I, F> GroupInner<K, I, F>
111111
if client < self.oldest_buffered_group {
112112
return None;
113113
}
114-
let elt = self.buffer.get_mut(bufidx).and_then(|queue| queue.next());
114+
let elt = self.buffer.get_mut(bufidx).and_then(Iterator::next);
115115
if elt.is_none() && client == self.oldest_buffered_group {
116116
// FIXME: VecDeque is unfortunately not zero allocation when empty,
117117
// so we do this job manually.

src/kmerge_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ impl<I, F> Iterator for KMergeBy<I, F>
215215
fn size_hint(&self) -> (usize, Option<usize>) {
216216
#[allow(deprecated)] //TODO: once msrv hits 1.51. replace `fold1` with `reduce`
217217
self.heap.iter()
218-
.map(|i| i.size_hint())
218+
.map(HeadTail::size_hint)
219219
.fold1(size_hint::add)
220220
.unwrap_or((0, Some(0)))
221221
}

src/tuple_impl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl<T> Iterator for TupleBuffer<T>
6262
0
6363
} else {
6464
buffer.iter()
65-
.position(|x| x.is_none())
65+
.position(Option::is_none)
6666
.unwrap_or(buffer.len())
6767
};
6868
(len, Some(len))

0 commit comments

Comments
 (0)