Skip to content

Commit 4850d96

Browse files
committed
shorten arg
1 parent 77b836d commit 4850d96

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/input.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,8 @@ impl Buttons {
204204

205205
/// Get the current touch pad state.
206206
#[must_use]
207-
pub fn read_pad(peer: Peer) -> Option<Pad> {
208-
let raw = unsafe { bindings::read_pad(peer.0 as u32) };
207+
pub fn read_pad(p: Peer) -> Option<Pad> {
208+
let raw = unsafe { bindings::read_pad(p.0 as u32) };
209209
if raw == 0xffff {
210210
None
211211
} else {
@@ -218,8 +218,8 @@ pub fn read_pad(peer: Peer) -> Option<Pad> {
218218

219219
/// Get the currently pressed buttons.
220220
#[must_use]
221-
pub fn read_buttons(peer: Peer) -> Buttons {
222-
let raw = unsafe { bindings::read_buttons(peer.0 as u32) };
221+
pub fn read_buttons(p: Peer) -> Buttons {
222+
let raw = unsafe { bindings::read_buttons(p.0 as u32) };
223223
Buttons {
224224
a: has_bit_set(raw, 0),
225225
b: has_bit_set(raw, 1),

0 commit comments

Comments
 (0)