From 0115f0f656aef3b6a3eb6d28a537844946a84cc6 Mon Sep 17 00:00:00 2001 From: bunnie Date: Fri, 22 Jan 2021 00:36:24 +0800 Subject: [PATCH] the great usize extinction event continues: keyboard btw this is to eliminate "usize" primarily in `structs` that are `repr(C)`. usize is ok in most other places. --- services/keyboard/src/api.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/keyboard/src/api.rs b/services/keyboard/src/api.rs index 22dd7e958..123cc6cf0 100644 --- a/services/keyboard/src/api.rs +++ b/services/keyboard/src/api.rs @@ -26,16 +26,16 @@ pub struct RowCol { #[derive(Debug)] #[repr(C)] pub struct KeyRawStates { - mid: usize, + mid: u32, pub keydowns: Vec, pub keyups: Vec, } impl KeyRawStates { - pub fn mid(&self) -> usize { self.mid } + pub fn mid(&self) -> usize { self.mid as usize } pub fn new() -> Self { KeyRawStates { - mid: xous::names::GID_KEYBOARD_RAW_KEYSTATE_EVENT, + mid: xous::names::GID_KEYBOARD_RAW_KEYSTATE_EVENT as u32, keydowns: Vec::new(), keyups: Vec::new(), }