mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-04-18 23:09:53 +02:00
refactor(clippy): apply various lint fixes
This commit is contained in:
@@ -131,7 +131,7 @@ impl ApplicationConfigurationGenerator {
|
||||
String::from("; Generated by komorebic.exe"),
|
||||
String::from("; To use this file, add the line below to the top of your komorebi.ahk configuration file"),
|
||||
String::from("; #Include %A_ScriptDir%\\komorebi.generated.ahk"),
|
||||
String::from("")
|
||||
String::new()
|
||||
];
|
||||
|
||||
let mut float_rules = vec![];
|
||||
@@ -168,7 +168,7 @@ impl ApplicationConfigurationGenerator {
|
||||
}
|
||||
}
|
||||
|
||||
lines.push(String::from(""));
|
||||
lines.push(String::new());
|
||||
}
|
||||
|
||||
Ok(lines)
|
||||
|
||||
@@ -229,16 +229,13 @@ impl Direction for CustomLayout {
|
||||
}
|
||||
|
||||
let (column_idx, column) = self.column_with_idx(idx);
|
||||
match column {
|
||||
None => false,
|
||||
Some(column) => match column {
|
||||
Column::Secondary(Some(ColumnSplitWithCapacity::Horizontal(_)))
|
||||
| Column::Tertiary(ColumnSplit::Horizontal) => {
|
||||
self.column_for_container_idx(idx - 1) == column_idx
|
||||
}
|
||||
_ => false,
|
||||
},
|
||||
}
|
||||
column.map_or(false, |column| match column {
|
||||
Column::Secondary(Some(ColumnSplitWithCapacity::Horizontal(_)))
|
||||
| Column::Tertiary(ColumnSplit::Horizontal) => {
|
||||
self.column_for_container_idx(idx - 1) == column_idx
|
||||
}
|
||||
_ => false,
|
||||
})
|
||||
}
|
||||
OperationDirection::Down => {
|
||||
if idx == count - 1 {
|
||||
@@ -246,16 +243,13 @@ impl Direction for CustomLayout {
|
||||
}
|
||||
|
||||
let (column_idx, column) = self.column_with_idx(idx);
|
||||
match column {
|
||||
None => false,
|
||||
Some(column) => match column {
|
||||
Column::Secondary(Some(ColumnSplitWithCapacity::Horizontal(_)))
|
||||
| Column::Tertiary(ColumnSplit::Horizontal) => {
|
||||
self.column_for_container_idx(idx + 1) == column_idx
|
||||
}
|
||||
_ => false,
|
||||
},
|
||||
}
|
||||
column.map_or(false, |column| match column {
|
||||
Column::Secondary(Some(ColumnSplitWithCapacity::Horizontal(_)))
|
||||
| Column::Tertiary(ColumnSplit::Horizontal) => {
|
||||
self.column_for_container_idx(idx + 1) == column_idx
|
||||
}
|
||||
_ => false,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user