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
@@ -52,6 +52,7 @@ impl DragData {
|
||||
}
|
||||
|
||||
/// Downcast this event data to a specific type
|
||||
#[inline(always)]
|
||||
pub fn downcast<T: 'static>(&self) -> Option<&T> {
|
||||
HasDragData::as_any(&*self.inner).downcast_ref::<T>()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user