Skip to content

Commit 4264c88

Browse files
committed
cleanup wm_info_provider.rs
1 parent 73446ca commit 4264c88

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

src/wm_info_provider.rs

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,13 @@ use crate::protocol::*;
1010
use crate::state::State;
1111

1212
mod dummy;
13-
pub use dummy::*;
14-
15-
#[cfg(feature = "river")]
16-
mod river;
17-
#[cfg(feature = "river")]
18-
pub use river::*;
1913

2014
#[cfg(feature = "hyprland")]
2115
mod hyprland;
22-
#[cfg(feature = "hyprland")]
23-
pub use hyprland::*;
24-
2516
#[cfg(feature = "niri")]
2617
mod niri;
27-
#[cfg(feature = "niri")]
28-
pub use niri::*;
18+
#[cfg(feature = "river")]
19+
mod river;
2920

3021
pub trait WmInfoProvider: Any {
3122
fn register(&self, _: &mut EventLoop) {}
@@ -56,21 +47,21 @@ pub trait WmInfoProvider: Any {
5647

5748
pub fn bind(conn: &mut Connection<State>, config: &WmConfig) -> Box<dyn WmInfoProvider> {
5849
#[cfg(feature = "river")]
59-
if let Some(river) = RiverInfoProvider::bind(conn, config) {
50+
if let Some(river) = river::RiverInfoProvider::bind(conn, config) {
6051
return Box::new(river);
6152
}
6253

6354
#[cfg(feature = "hyprland")]
64-
if let Some(hyprland) = HyprlandInfoProvider::new() {
55+
if let Some(hyprland) = hyprland::HyprlandInfoProvider::new() {
6556
return Box::new(hyprland);
6657
}
6758

6859
#[cfg(feature = "niri")]
69-
if let Some(niri) = NiriInfoProvider::new() {
60+
if let Some(niri) = niri::NiriInfoProvider::new() {
7061
return Box::new(niri);
7162
}
7263

73-
Box::new(DummyInfoProvider)
64+
Box::new(dummy::DummyInfoProvider)
7465
}
7566

7667
#[derive(Debug)]

0 commit comments

Comments
 (0)