oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git

Addressed let/ok comment and surpressed dead code warning on unused function that will be re-implemented later.

Commit
f82213a9030414af3aab3773ce841894f55e35e3
Parent
52048f6
Author
tonybtw <tonybtw@tonybtw.com>
Date
2025-10-25 17:12:53

Diff

diff --git a/src/monitor.rs b/src/monitor.rs
index b7de736..1693cac 100644
--- a/src/monitor.rs
+++ b/src/monitor.rs
@@ -58,14 +58,11 @@ pub fn detect_monitors(
         .map_or(false, |reply| reply.state != 0);
 
     if xinerama_active {
-        let xinerama_cookie = match connection.xinerama_query_screens() {
-            Ok(cookie) => cookie,
-            Err(_) => return Ok(fallback_monitors()),
+        let Ok(xinerama_cookie) = connection.xinerama_query_screens() else {
+            return Ok(fallback_monitors());
         };
-
-        let xinerama_reply = match xinerama_cookie.reply() {
-            Ok(reply) => reply,
-            Err(_) => return Ok(fallback_monitors()),
+        let Ok(xinerama_reply) = xinerama_cookie.reply() else {
+            return Ok(fallback_monitors());
         };
 
         for screen_info in &xinerama_reply.screen_info {
diff --git a/src/window_manager.rs b/src/window_manager.rs
index 13ff6e2..bf3f6b3 100644
--- a/src/window_manager.rs
+++ b/src/window_manager.rs
@@ -184,7 +184,12 @@ impl WindowManager {
         Ok(window_manager)
     }
 
-    fn get_saved_selected_tags(
+    /**
+     *
+     * This function is deprecated for now, but will potentially be used in the future.
+     *
+     */
+    fn _get_saved_selected_tags(
         connection: &RustConnection,
         root: Window,
         tag_count: usize,