Skip to content

Commit 501783e

Browse files
hellow554phimuemue
authored andcommitted
allow usage of fold1
1 parent ba098ad commit 501783e

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/concat_impl.rs

+1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@ pub fn concat<I>(iterable: I) -> I::Item
1818
where I: IntoIterator,
1919
I::Item: Extend<<<I as IntoIterator>::Item as IntoIterator>::Item> + IntoIterator + Default
2020
{
21+
#[allow(deprecated)] //TODO: once msrv hits 1.51. replace `fold1` with `reduce`
2122
iterable.into_iter().fold1(|mut a, b| { a.extend(b); a }).unwrap_or_default()
2223
}

src/kmerge_impl.rs

+1
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ impl<I, F> Iterator for KMergeBy<I, F>
213213
}
214214

215215
fn size_hint(&self) -> (usize, Option<usize>) {
216+
#[allow(deprecated)] //TODO: once msrv hits 1.51. replace `fold1` with `reduce`
216217
self.heap.iter()
217218
.map(|i| i.size_hint())
218219
.fold1(size_hint::add)

0 commit comments

Comments
 (0)