mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-11-18 14:48:34 +01:00
refactor(clippy): apply rustc 1.90.0 lints
This commit is contained in:
1 parent
de2c105fe1
commit
a8de084a85
2 files changed
+5
-5
No files matched your search
@@ -784,7 +784,7 @@ fn recursive_fibonacci(
|
||||
right: resized.right,
|
||||
bottom: resized.bottom,
|
||||
}]
|
||||
} else if idx % 2 != 0 {
|
||||
} else if !idx.is_multiple_of(2) {
|
||||
let mut res = vec![Rect {
|
||||
left: resized.left,
|
||||
top: main_y,
|
||||
|
||||
@@ -101,7 +101,7 @@ impl Direction for DefaultLayout {
|
||||
Self::Scrolling => false,
|
||||
},
|
||||
OperationDirection::Down => match self {
|
||||
Self::BSP => idx != count - 1 && idx % 2 != 0,
|
||||
Self::BSP => idx != count - 1 && !idx.is_multiple_of(2),
|
||||
Self::Columns => false,
|
||||
Self::Rows => idx != count - 1,
|
||||
Self::VerticalStack | Self::RightMainVerticalStack => idx != 0 && idx != count - 1,
|
||||
@@ -121,7 +121,7 @@ impl Direction for DefaultLayout {
|
||||
Self::Scrolling => idx != 0,
|
||||
},
|
||||
OperationDirection::Right => match self {
|
||||
Self::BSP => idx % 2 == 0 && idx != count - 1,
|
||||
Self::BSP => idx.is_multiple_of(2) && idx != count - 1,
|
||||
Self::Columns => idx != count - 1,
|
||||
Self::Rows => false,
|
||||
Self::VerticalStack => idx == 0,
|
||||
@@ -145,7 +145,7 @@ impl Direction for DefaultLayout {
|
||||
) -> usize {
|
||||
match self {
|
||||
Self::BSP => {
|
||||
if idx % 2 == 0 {
|
||||
if idx.is_multiple_of(2) {
|
||||
idx - 1
|
||||
} else {
|
||||
idx - 2
|
||||
@@ -189,7 +189,7 @@ impl Direction for DefaultLayout {
|
||||
) -> usize {
|
||||
match self {
|
||||
Self::BSP => {
|
||||
if idx % 2 == 0 {
|
||||
if idx.is_multiple_of(2) {
|
||||
idx - 2
|
||||
} else {
|
||||
idx - 1
|
||||
|
||||
Reference in new issue
Block a user