diff options
| author | MaxVerevkin <maxxverrr@gmail.com> | 2025-04-06 17:35:16 +0300 |
|---|---|---|
| committer | MaxVerevkin <maxxverrr@gmail.com> | 2025-04-06 17:35:16 +0300 |
| commit | 1db06d90067ad8ce1e6e5a808acddd16aac3adec (patch) | |
| tree | abd85fcc17386d12ca67ea5408c1139fcaef4ee1 /src/wm_info_provider.rs | |
| parent | 77ba6b79be0c14483eac5ea683ab1b5dcf581058 (diff) | |
| download | i3bar-mango-1db06d90067ad8ce1e6e5a808acddd16aac3adec.tar.gz | |
use dyn trait upcasting
Diffstat (limited to 'src/wm_info_provider.rs')
| -rw-r--r-- | src/wm_info_provider.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/wm_info_provider.rs b/src/wm_info_provider.rs index 0e3252c..4c5e904 100644 --- a/src/wm_info_provider.rs +++ b/src/wm_info_provider.rs @@ -21,7 +21,7 @@ pub use hyprland::*; mod niri; pub use niri::*; -pub trait WmInfoProvider { +pub trait WmInfoProvider: Any { fn register(&self, _: &mut EventLoop) {} fn new_ouput(&mut self, _: &mut Connection<State>, _: &Output) {} @@ -46,9 +46,6 @@ pub trait WmInfoProvider { _btn: PointerBtn, ) { } - - // TODO: remove once RFC3324 (dyn upcasting coercion) is stabilized (hopefully in Rust 1.86.0) - fn as_any(&mut self) -> &mut dyn Any; } pub fn bind(conn: &mut Connection<State>, config: &WmConfig) -> Box<dyn WmInfoProvider> { |
