mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-31 22:43:16 +02:00
refactor(clippy): apply various lint fixes
This commit is contained in:
@@ -509,16 +509,17 @@ fn main() -> Result<()> {
|
||||
|
||||
Hidden::create("komorebi-hidden")?;
|
||||
|
||||
let static_config = if let Some(config) = opts.config {
|
||||
Option::from(config)
|
||||
} else {
|
||||
let komorebi_json = HOME_DIR.join("komorebi.json");
|
||||
if komorebi_json.is_file() {
|
||||
Option::from(komorebi_json)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
};
|
||||
let static_config = opts.config.map_or_else(
|
||||
|| {
|
||||
let komorebi_json = HOME_DIR.join("komorebi.json");
|
||||
if komorebi_json.is_file() {
|
||||
Option::from(komorebi_json)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
},
|
||||
Option::from,
|
||||
);
|
||||
|
||||
let wm = if let Some(config) = &static_config {
|
||||
tracing::info!(
|
||||
|
||||
@@ -700,7 +700,7 @@ impl WindowsApi {
|
||||
Self::system_parameters_info_w(
|
||||
SPI_SETFOREGROUNDLOCKTIMEOUT,
|
||||
0,
|
||||
0 as *mut c_void,
|
||||
std::ptr::null_mut::<c_void>(),
|
||||
SPIF_SENDCHANGE,
|
||||
)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user