From 6fbba6f4eec1f2e7150f02e4c171f8ee60a46236 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 31 Aug 2019 06:20:56 +0200 Subject: Make `clippy` happy --- src/input/keyboard/key_code.rs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'src/input') diff --git a/src/input/keyboard/key_code.rs b/src/input/keyboard/key_code.rs index 5cf9301f..940df0db 100644 --- a/src/input/keyboard/key_code.rs +++ b/src/input/keyboard/key_code.rs @@ -1,6 +1,11 @@ -/// The symbolic name of a keyboard key +/// The symbolic name of a keyboard key. +/// +/// This is mostly the `KeyCode` type found in `winit`. If you are using +/// `winit`, consider enabling the `winit` feature to get conversion +/// implementations for free! #[derive(Debug, Hash, Ord, PartialOrd, PartialEq, Eq, Clone, Copy)] #[repr(u32)] +#[allow(missing_docs)] pub enum KeyCode { /// The '1' key over the letters. Key1, @@ -50,7 +55,7 @@ pub enum KeyCode { Y, Z, - /// The Escape key, next to F1. + /// The Escape key, next to F1 Escape, F1, @@ -78,14 +83,14 @@ pub enum KeyCode { F23, F24, - /// Print Screen/SysRq. + /// Print Screen/SysRq Snapshot, - /// Scroll Lock. + /// Scroll Lock Scroll, - /// Pause/Break key, next to Scroll lock. + /// Pause/Break key, next to Scroll lock Pause, - /// `Insert`, next to Backspace. + /// `Insert`, next to Backspace Insert, Home, Delete, @@ -98,15 +103,11 @@ pub enum KeyCode { Right, Down, - /// The Backspace key, right over Enter. - // TODO: rename - Back, - /// The Enter key. - Return, - /// The space bar. + Backspace, + Enter, Space, - /// The "Compose" key on Linux. + /// The "Compose" key on Linux Compose, Caret, -- cgit