Refactor WebEventExt (#2707)

* Create WebEventExt::try_as_web_event and refactor
* Inline and adjust error message
* Inline downcast methods
This commit is contained in:
Matt Hunzinger authored and GitHub committed 2024-07-31 13:01:25 -07:00
1 parent 63e7aab4e8
commit 4bf71111c8
17 files changed
+71 -42

No files matched your search

+1
View File
@@ -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>()
}