From ee748713c76af21195c72d2317dd507c348308b2 Mon Sep 17 00:00:00 2001 From: Suchir Kavi Date: Mon, 15 Apr 2024 21:46:26 -0700 Subject: [PATCH] Add manual `Default` impl for `FutureGroup` Removes restriction that `F: Default` --- src/future/future_group.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/future/future_group.rs b/src/future/future_group.rs index 97058ac..bcb4fa4 100644 --- a/src/future/future_group.rs +++ b/src/future/future_group.rs @@ -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 { #[pin] @@ -80,6 +79,12 @@ impl Debug for FutureGroup { } } +impl Default for FutureGroup { + fn default() -> Self { + Self::new() + } +} + impl FutureGroup { /// Create a new instance of `FutureGroup`. ///