chore(clippy): address warnings

This commit is contained in:
LGUG2Z
2025-12-23 17:19:00 -08:00
parent 4d67f5fed3
commit ac56590791
2 changed files with 8 additions and 10 deletions

View File

@@ -1,5 +1,3 @@
#![allow(unused_assignments, unused_variables)] // TODO: something got weird in clippy 1.92.0
use std::collections::VecDeque; use std::collections::VecDeque;
use std::ffi::OsStr; use std::ffi::OsStr;
use std::fmt::Display; use std::fmt::Display;
@@ -1272,7 +1270,7 @@ impl Workspace {
0 | 1 => self.enforce_no_resize(), 0 | 1 => self.enforce_no_resize(),
_ => { _ => {
// Zero is actually on the left // Zero is actually on the left
if let Some(mut left) = resize_dimensions[0] { if let Some(left) = resize_dimensions[0].as_mut() {
left.top = 0; left.top = 0;
left.bottom = 0; left.bottom = 0;
left.left = 0; left.left = 0;
@@ -1305,7 +1303,7 @@ impl Workspace {
0 | 1 => self.enforce_no_resize(), 0 | 1 => self.enforce_no_resize(),
_ => { _ => {
// Zero is actually on the right // Zero is actually on the right
if let Some(mut left) = resize_dimensions[1] { if let Some(left) = resize_dimensions[1].as_mut() {
left.top = 0; left.top = 0;
left.bottom = 0; left.bottom = 0;
left.right = 0; left.right = 0;
@@ -1336,7 +1334,7 @@ impl Workspace {
match resize_dimensions.len() { match resize_dimensions.len() {
0 | 1 => self.enforce_no_resize(), 0 | 1 => self.enforce_no_resize(),
_ => { _ => {
if let Some(mut left) = resize_dimensions[0] { if let Some(left) = resize_dimensions[0].as_mut() {
left.top = 0; left.top = 0;
left.left = 0; left.left = 0;
left.right = 0; left.right = 0;
@@ -1367,14 +1365,14 @@ impl Workspace {
// Two windows can only be resized in the middle // Two windows can only be resized in the middle
2 => { 2 => {
// Zero is actually on the right // Zero is actually on the right
if let Some(mut right) = resize_dimensions[0] { if let Some(right) = resize_dimensions[0].as_mut() {
right.top = 0; right.top = 0;
right.bottom = 0; right.bottom = 0;
right.right = 0; right.right = 0;
} }
// One is on the left // One is on the left
if let Some(mut left) = resize_dimensions[1] { if let Some(left) = resize_dimensions[1].as_mut() {
left.top = 0; left.top = 0;
left.bottom = 0; left.bottom = 0;
left.left = 0; left.left = 0;
@@ -1384,13 +1382,13 @@ impl Workspace {
// stack on the right // stack on the right
_ => { _ => {
// Central can be resized left or right // Central can be resized left or right
if let Some(mut right) = resize_dimensions[0] { if let Some(right) = resize_dimensions[0].as_mut() {
right.top = 0; right.top = 0;
right.bottom = 0; right.bottom = 0;
} }
// Left one can only be resized to the right // Left one can only be resized to the right
if let Some(mut left) = resize_dimensions[1] { if let Some(left) = resize_dimensions[1].as_mut() {
left.top = 0; left.top = 0;
left.bottom = 0; left.bottom = 0;
left.left = 0; left.left = 0;

View File

@@ -1,6 +1,6 @@
#![warn(clippy::all)] #![warn(clippy::all)]
#![allow(clippy::missing_errors_doc, clippy::doc_markdown)] #![allow(clippy::missing_errors_doc, clippy::doc_markdown)]
#![allow(unused_assignments)] // TODO: something got weird in clippy 1.92.0 #![allow(unused_assignments)] // false positives for the error reporter
use chrono::Utc; use chrono::Utc;
use komorebi_client::PathExt; use komorebi_client::PathExt;