box not necessary here..
Some checks are pending
Rust/sat-rs/pipeline/head Build started...

This commit is contained in:
Robin Müller 2023-07-19 11:37:29 +02:00
parent e6415bcba0
commit 781610d48a
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

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