mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
chore(clippy): address warnings
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
#![allow(unused_assignments, unused_variables)] // TODO: something got weird in clippy 1.92.0
|
||||
|
||||
use std::collections::VecDeque;
|
||||
use std::ffi::OsStr;
|
||||
use std::fmt::Display;
|
||||
@@ -1272,7 +1270,7 @@ impl Workspace {
|
||||
0 | 1 => self.enforce_no_resize(),
|
||||
_ => {
|
||||
// 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.bottom = 0;
|
||||
left.left = 0;
|
||||
@@ -1305,7 +1303,7 @@ impl Workspace {
|
||||
0 | 1 => self.enforce_no_resize(),
|
||||
_ => {
|
||||
// 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.bottom = 0;
|
||||
left.right = 0;
|
||||
@@ -1336,7 +1334,7 @@ impl Workspace {
|
||||
match resize_dimensions.len() {
|
||||
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.left = 0;
|
||||
left.right = 0;
|
||||
@@ -1367,14 +1365,14 @@ impl Workspace {
|
||||
// Two windows can only be resized in the middle
|
||||
2 => {
|
||||
// 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.bottom = 0;
|
||||
right.right = 0;
|
||||
}
|
||||
|
||||
// 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.bottom = 0;
|
||||
left.left = 0;
|
||||
@@ -1384,13 +1382,13 @@ impl Workspace {
|
||||
// stack on the 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.bottom = 0;
|
||||
}
|
||||
|
||||
// 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.bottom = 0;
|
||||
left.left = 0;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#![warn(clippy::all)]
|
||||
#![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 komorebi_client::PathExt;
|
||||
|
||||
Reference in New Issue
Block a user