mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
feat: Manual impl of PartialEq for Coroutine
(#2895)
This commit is contained in:
parent
a575a425e3
commit
e6efd973d8
1 changed files with 6 additions and 1 deletions
|
@ -110,7 +110,6 @@ pub fn use_coroutine_handle<M: 'static>() -> Coroutine<M> {
|
|||
use_hook(consume_context::<Coroutine<M>>)
|
||||
}
|
||||
|
||||
#[derive(PartialEq)]
|
||||
pub struct Coroutine<T: 'static> {
|
||||
needs_regen: Signal<bool>,
|
||||
tx: CopyValue<Option<UnboundedSender<T>>>,
|
||||
|
@ -149,3 +148,9 @@ impl<T> Clone for Coroutine<T> {
|
|||
*self
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> PartialEq for Coroutine<T> {
|
||||
fn clone(&self) -> Self {
|
||||
self.needs_regen == other.needs_regen && self.tx == other.tx && self.task == other.task
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue