refactor(clippy): apply various lint fixes

This commit is contained in:
LGUG2Z
2023-12-02 13:47:49 -08:00
parent 5a99a688a6
commit 1c589491a9
2 changed files with 12 additions and 11 deletions

View File

@@ -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!(

View File

@@ -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,
)?;