Skip to content

Commit

Permalink
refactor(clippy): apply various lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
LGUG2Z committed Dec 2, 2023
1 parent 5a99a68 commit 1c58949
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
21 changes: 11 additions & 10 deletions komorebi/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down
2 changes: 1 addition & 1 deletion komorebi/src/windows_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)?;

Expand Down

0 comments on commit 1c58949

Please sign in to comment.