Allow comparing ViewHandle to AnyViewHandle
Since they both have a window_id and a view_id. Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
parent
d6962d957b
commit
8f61134e7e
1 changed files with 6 additions and 0 deletions
|
@ -4915,6 +4915,12 @@ impl<T: View> From<ViewHandle<T>> for AnyViewHandle {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl<T> PartialEq<ViewHandle<T>> for AnyViewHandle {
|
||||||
|
fn eq(&self, other: &ViewHandle<T>) -> bool {
|
||||||
|
self.window_id == other.window_id && self.view_id == other.view_id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl Drop for AnyViewHandle {
|
impl Drop for AnyViewHandle {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
self.ref_counts
|
self.ref_counts
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue