Skip to content

Commit

Permalink
refactor: Use one line for variable initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
donovanglover committed Aug 2, 2023
1 parent 4828a58 commit 0802aa5
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,8 @@ fn main() -> hyprland::Result<()> {

// On active window changes
event_listener.add_active_window_change_handler(move |data| {
let Some(WindowEventData { window_address, .. }) = data else {
// Ignore the event if no window_address was given
return
};
// Ignore the event if no window_address was given
let Some(WindowEventData { window_address, .. }) = data else { return };

let num_threads = num_threads_outer.clone();
let last_address = last_address_outer.clone();
Expand Down

0 comments on commit 0802aa5

Please sign in to comment.