Skip to content

Commit

Permalink
Update bin-mouse.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
EthoIRL committed Sep 18, 2024
1 parent f7e07d9 commit d4d2113
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/example/bin-mouse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,9 @@ pub fn main() {
for mouse in mouses.iter() {
let movement_receiver = mouse.get_movement();

match movement_receiver.try_recv() {
Ok(movement) => {
println!("X: {} | Y: {} | WHEEL: {}", movement.relative_x, movement.relative_y, movement.relative_wheel);
},
Err(_) => {}
};
if let Ok(movement) = movement_receiver.try_recv() {
println!("X: {} | Y: {} | WHEEL: {}", movement.relative_x, movement.relative_y, movement.relative_wheel);
}
}
});

Expand Down

0 comments on commit d4d2113

Please sign in to comment.