Take IntoIterator instead of Iterator
This commit is contained in:
parent
a508b007d8
commit
5de404ddd9
3 changed files with 8 additions and 4 deletions
|
|
@ -50,10 +50,11 @@ where
|
|||
///
|
||||
/// [`Subscription`]: struct.Subscription.html
|
||||
pub fn batch(
|
||||
subscriptions: impl Iterator<Item = Subscription<H, I, O>>,
|
||||
subscriptions: impl IntoIterator<Item = Subscription<H, I, O>>,
|
||||
) -> Self {
|
||||
Self {
|
||||
recipes: subscriptions
|
||||
.into_iter()
|
||||
.flat_map(|subscription| subscription.recipes)
|
||||
.collect(),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue