box not necessary here #61

Merged
muellerr merged 1 commits from event-man-api-improvement into main 2023-07-19 11:37:59 +02:00
Showing only changes of commit 781610d48a - Show all commits

View File

@ -119,7 +119,7 @@ pub trait SenderTable<SendProviderError, Event: GenericEvent = EventU32, AuxData
fn get_send_event_provider(
&self,
id: &ChannelId,
) -> Option<&Box<dyn SendEventProvider<Event, AuxDataProvider, Error = SendProviderError>>>;
) -> Option<&dyn SendEventProvider<Event, AuxDataProvider, Error = SendProviderError>>;
fn add_send_event_provider(
&mut self,
send_provider: Box<
@ -381,9 +381,11 @@ impl<SendProviderError, Event: GenericEvent, AuxDataProvider>
fn get_send_event_provider(
&self,
id: &ChannelId,
) -> Option<&Box<dyn SendEventProvider<Event, AuxDataProvider, Error = SendProviderError>>>
{
self.senders.get(id).filter(|sender| sender.id() == *id)
) -> Option<&dyn SendEventProvider<Event, AuxDataProvider, Error = SendProviderError>> {
self.senders
.get(id)
.filter(|sender| sender.id() == *id)
.map(|v| v.as_ref())
}
fn add_send_event_provider(