clippy: remove unneeded return statements (#31923)

This commit is contained in:
Azhar Ismagulova 2024-03-28 16:17:47 +00:00 committed by GitHub
parent 7349ce5b6a
commit 0728378424
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 15 additions and 19 deletions

View file

@ -286,11 +286,7 @@ impl Gamepad {
/// <https://www.w3.org/TR/gamepad/#dfn-gamepad-user-gesture>
pub fn contains_user_gesture(update_type: GamepadUpdateType) -> bool {
match update_type {
GamepadUpdateType::Axis(_, value) => {
return value.abs() > AXIS_TILT_THRESHOLD;
},
GamepadUpdateType::Button(_, value) => {
return value > BUTTON_PRESS_THRESHOLD;
},
};
GamepadUpdateType::Axis(_, value) => value.abs() > AXIS_TILT_THRESHOLD,
GamepadUpdateType::Button(_, value) => value > BUTTON_PRESS_THRESHOLD,
}
}