Skip to content

Commit ee74871

Browse files
committed
Add manual Default impl for FutureGroup
Removes restriction that `F: Default`
1 parent de8a750 commit ee74871

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/future/future_group.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ use crate::utils::{PollState, PollVec, WakerVec};
5959
/// ```
6060
6161
#[must_use = "`FutureGroup` does nothing if not iterated over"]
62-
#[derive(Default)]
6362
#[pin_project::pin_project]
6463
pub struct FutureGroup<F> {
6564
#[pin]
@@ -80,6 +79,12 @@ impl<T: Debug> Debug for FutureGroup<T> {
8079
}
8180
}
8281

82+
impl<T> Default for FutureGroup<T> {
83+
fn default() -> Self {
84+
Self::new()
85+
}
86+
}
87+
8388
impl<F> FutureGroup<F> {
8489
/// Create a new instance of `FutureGroup`.
8590
///

0 commit comments

Comments
 (0)