Remove Message: Clone bound in some web widgets

This commit is contained in:
Héctor Ramón Jiménez 2020-01-13 06:58:48 +01:00
parent b5cd9923f2
commit 361be7f6b7
5 changed files with 21 additions and 11 deletions

View file

@ -8,11 +8,18 @@ use std::rc::Rc;
///
/// [`Application`]: trait.Application.html
#[allow(missing_debug_implementations)]
#[derive(Clone)]
pub struct Bus<Message> {
publish: Rc<Box<dyn Fn(Message, &mut dyn dodrio::RootRender)>>,
}
impl<Message> Clone for Bus<Message> {
fn clone(&self) -> Self {
Self {
publish: Rc::clone(&self.publish),
}
}
}
impl<Message> Bus<Message>
where
Message: 'static,