Refactor WebEventExt (#2707)
* Create WebEventExt::try_as_web_event and refactor * Inline and adjust error message * Inline downcast methods
This commit is contained in:
1 parent
63e7aab4e8
commit
4bf71111c8
17 files changed
+71
-42
No files matched your search
@@ -17,6 +17,7 @@ impl PointerData {
|
||||
}
|
||||
|
||||
/// Downcast this event to a concrete event type
|
||||
#[inline(always)]
|
||||
pub fn downcast<T: 'static>(&self) -> Option<&T> {
|
||||
self.inner.as_any().downcast_ref::<T>()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user