tony / oxwm

Addressed let/ok comment and surpressed dead code warning on unused function that will be re-implemented later. Browse files
tonybtw committed 2025-10-25 parent 52048f6 commit f82213a9030414af3aab3773ce841894f55e35e3
Showing 2 changed files with 10 additions and 8 deletions. UnifiedSplit
+4 −7 src/monitor.rs
@@ -58,14 +58,11 @@ pub fn detect_monitors(
58 .map_or(false, |reply| reply.state != 0); 58 .map_or(false, |reply| reply.state != 0);
59 59
60 if xinerama_active { 60 if xinerama_active {
61 - let xinerama_cookie = match connection.xinerama_query_screens() { 61 + let Ok(xinerama_cookie) = connection.xinerama_query_screens() else {
62 - Ok(cookie) => cookie, 62 + return Ok(fallback_monitors());
63 - Err(_) => return Ok(fallback_monitors()),
64 }; 63 };
65 - 64 + let Ok(xinerama_reply) = xinerama_cookie.reply() else {
66 - let xinerama_reply = match xinerama_cookie.reply() { 65 + return Ok(fallback_monitors());
67 - Ok(reply) => reply,
68 - Err(_) => return Ok(fallback_monitors()),
69 }; 66 };
70 67
71 for screen_info in &xinerama_reply.screen_info { 68 for screen_info in &xinerama_reply.screen_info {
+6 −1 src/window_manager.rs
@@ -184,7 +184,12 @@ impl WindowManager {
184 Ok(window_manager) 184 Ok(window_manager)
185 } 185 }
186 186
187 - fn get_saved_selected_tags( 187 + /**
188 + *
189 + * This function is deprecated for now, but will potentially be used in the future.
190 + *
191 + */
192 + fn _get_saved_selected_tags(
188 connection: &RustConnection, 193 connection: &RustConnection,
189 root: Window, 194 root: Window,
190 tag_count: usize, 195 tag_count: usize,