summaryrefslogtreecommitdiff
path: root/src/wm_info_provider.rs
diff options
context:
space:
mode:
authorMaxVerevkin <maxxverrr@gmail.com>2025-04-06 17:35:16 +0300
committerMaxVerevkin <maxxverrr@gmail.com>2025-04-06 17:35:16 +0300
commit1db06d90067ad8ce1e6e5a808acddd16aac3adec (patch)
treeabd85fcc17386d12ca67ea5408c1139fcaef4ee1 /src/wm_info_provider.rs
parent77ba6b79be0c14483eac5ea683ab1b5dcf581058 (diff)
downloadi3bar-mango-1db06d90067ad8ce1e6e5a808acddd16aac3adec.tar.gz
use dyn trait upcasting
Diffstat (limited to 'src/wm_info_provider.rs')
-rw-r--r--src/wm_info_provider.rs5
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> {