use let-else syntax in divergent match in `scan_existing_windows`
Browse files
+2 −3 src/window_manager.rs
| @@ -170,9 +170,8 @@ impl WindowManager { | |||
| 170 | continue; | 170 | continue; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | - let attrs = match self.connection.get_window_attributes(window)?.reply() { | 173 | + let Ok(attrs) = self.connection.get_window_attributes(window)?.reply() else { |
| 174 | - Ok(attrs) => attrs, | 174 | + continue; |
| 175 | - Err(_) => continue, | ||
| 176 | }; | 175 | }; |
| 177 | 176 | ||
| 178 | if attrs.override_redirect { | 177 | if attrs.override_redirect { |