mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 05:10:03 -04:00
chore: use our own AsAny to provide &dyn Any
This removes the direct requirement to implement `as_any` and it could be just derived. Also implement HasDisplayHandle for dyn ActiveEventLoop + '_. Suggested-by: daxpedda <daxpedda@gmail.com>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
use std::any::Any;
|
||||
use std::cell::Cell;
|
||||
use std::clone::Clone;
|
||||
use std::iter;
|
||||
@@ -693,10 +692,6 @@ impl RootActiveEventLoop for ActiveEventLoop {
|
||||
RootOwnedDisplayHandle { platform: OwnedDisplayHandle }
|
||||
}
|
||||
|
||||
fn as_any(&self) -> &dyn Any {
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "rwh_06")]
|
||||
fn rwh_06_handle(&self) -> &dyn rwh_06::HasDisplayHandle {
|
||||
self
|
||||
|
||||
Reference in New Issue
Block a user