From 781610d48a62eeca06528261026a4db15fab3b58 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 19 Jul 2023 11:37:29 +0200 Subject: [PATCH] box not necessary here.. --- satrs-core/src/event_man.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/satrs-core/src/event_man.rs b/satrs-core/src/event_man.rs index dbc741a..f465969 100644 --- a/satrs-core/src/event_man.rs +++ b/satrs-core/src/event_man.rs @@ -119,7 +119,7 @@ pub trait SenderTable Option<&Box>>; + ) -> Option<&dyn SendEventProvider>; fn add_send_event_provider( &mut self, send_provider: Box< @@ -381,9 +381,11 @@ impl fn get_send_event_provider( &self, id: &ChannelId, - ) -> Option<&Box>> - { - self.senders.get(id).filter(|sender| sender.id() == *id) + ) -> Option<&dyn SendEventProvider> { + self.senders + .get(id) + .filter(|sender| sender.id() == *id) + .map(|v| v.as_ref()) } fn add_send_event_provider(