keyboard: Implement From instead of Into

Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
Jean-Pierre De Jesus DIAZ 2022-10-12 15:24:55 +02:00
parent 709ff8f9f2
commit 6163414dd1
No known key found for this signature in database
GPG key ID: 6279AEC20A9524EC

View file

@ -35,9 +35,9 @@ impl From<usize> for KeyMap {
}
}
}
impl Into<usize> for KeyMap {
fn into(self) -> usize {
match self {
impl From<KeyMap> for usize {
fn from(map: KeyMap) -> usize {
match map {
// note: these indicese correspond to the position on the keyboard menu
KeyMap::Qwerty => 0,
KeyMap::Azerty => 1,