Skip to content

Commit

Permalink
Add manual Default impl for FutureGroup
Browse files Browse the repository at this point in the history
Removes restriction that `F: Default`
  • Loading branch information
soooch committed Apr 23, 2024
1 parent de8a750 commit ee74871
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/future/future_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ use crate::utils::{PollState, PollVec, WakerVec};
/// ```
#[must_use = "`FutureGroup` does nothing if not iterated over"]
#[derive(Default)]
#[pin_project::pin_project]
pub struct FutureGroup<F> {
#[pin]
Expand All @@ -80,6 +79,12 @@ impl<T: Debug> Debug for FutureGroup<T> {
}
}

impl<T> Default for FutureGroup<T> {
fn default() -> Self {
Self::new()
}
}

impl<F> FutureGroup<F> {
/// Create a new instance of `FutureGroup`.
///
Expand Down

0 comments on commit ee74871

Please sign in to comment.