Remove Message: Clone bound in some web widgets
This commit is contained in:
parent
b5cd9923f2
commit
361be7f6b7
5 changed files with 21 additions and 11 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue