From d829623d42d6574cfad84fb7c7a86c218900b218 Mon Sep 17 00:00:00 2001 From: Garry O'Donnell Date: Tue, 7 May 2024 11:02:16 +0000 Subject: [PATCH] Implement default for EventBroker --- backend/graphql_event_broker/src/lib.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/backend/graphql_event_broker/src/lib.rs b/backend/graphql_event_broker/src/lib.rs index be6e8a0a..e73b8dde 100644 --- a/backend/graphql_event_broker/src/lib.rs +++ b/backend/graphql_event_broker/src/lib.rs @@ -34,6 +34,12 @@ use tokio_stream::wrappers::BroadcastStream; #[derive(Debug)] pub struct EventBroker(Lazy>); +impl Default for EventBroker { + fn default() -> Self { + Self::new() + } +} + impl EventBroker { /// Constructs an [`EventBroker`], creation of the underlying channel is performed at first use. pub const fn new() -> Self {