Skip to content

Commit

Permalink
cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
rszyma committed Oct 22, 2023
1 parent 57d88e7 commit 3ee2983
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/oskbd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,12 @@ impl TryFrom<ScrollEvent> for OsCode {
type Error = ();
fn try_from(value: ScrollEvent) -> Result<Self, Self::Error> {
match value.kind {
ScrollEventKind::Standard => {
Ok(match value.direction {
MoveDirection::Up => OsCode::MouseWheelUp,
MoveDirection::Down => OsCode::MouseWheelDown,
MoveDirection::Left => OsCode::MouseWheelLeft,
MoveDirection::Right => OsCode::MouseWheelRight,
})
}
ScrollEventKind::Standard => Ok(match value.direction {
MoveDirection::Up => OsCode::MouseWheelUp,
MoveDirection::Down => OsCode::MouseWheelDown,
MoveDirection::Left => OsCode::MouseWheelLeft,
MoveDirection::Right => OsCode::MouseWheelRight,
}),
ScrollEventKind::HiRes => Err(()),
}
}
Expand Down

0 comments on commit 3ee2983

Please sign in to comment.