From 8aff7262d64f11b6d0e37d5dccc4ea1932bd363c Mon Sep 17 00:00:00 2001 From: Michael Dorst Date: Wed, 29 Dec 2021 17:38:10 +0000 Subject: [PATCH] Fix `doc_markdown` lints in `bevy_input` (#3475) #3457 adds the `doc_markdown` clippy lint, which checks doc comments to make sure code identifiers are escaped with backticks. This causes a lot of lint errors, so this is one of a number of PR's that will fix those lint errors one crate at a time. This PR fixes lints in the `bevy_input` crate. --- crates/bevy_input/src/gamepad.rs | 4 ++-- crates/bevy_input/src/keyboard.rs | 2 +- crates/bevy_input/src/mouse.rs | 2 +- crates/bevy_input/src/system.rs | 2 +- crates/bevy_input/src/touch.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/bevy_input/src/gamepad.rs b/crates/bevy_input/src/gamepad.rs index a44a8a4cebc1c..b71457983d8de 100644 --- a/crates/bevy_input/src/gamepad.rs +++ b/crates/bevy_input/src/gamepad.rs @@ -8,9 +8,9 @@ use bevy_utils::{tracing::info, HashMap, HashSet}; pub struct Gamepad(pub usize); #[derive(Default)] -/// Container of unique connected [Gamepad]s +/// Container of unique connected [`Gamepad`]s /// -/// [Gamepad]s are registered and deregistered in [gamepad_connection_system] +/// [`Gamepad`]s are registered and deregistered in [`gamepad_connection_system`] pub struct Gamepads { gamepads: HashSet, } diff --git a/crates/bevy_input/src/keyboard.rs b/crates/bevy_input/src/keyboard.rs index 6bc952e81818e..31d3a1ada5e80 100644 --- a/crates/bevy_input/src/keyboard.rs +++ b/crates/bevy_input/src/keyboard.rs @@ -10,7 +10,7 @@ pub struct KeyboardInput { pub state: ElementState, } -/// Updates the Input resource with the latest KeyboardInput events +/// Updates the `Input` resource with the latest `KeyboardInput` events pub fn keyboard_input_system( mut keyboard_input: ResMut>, mut keyboard_input_events: EventReader, diff --git a/crates/bevy_input/src/mouse.rs b/crates/bevy_input/src/mouse.rs index 71899ca95ca63..10e32932faeec 100644 --- a/crates/bevy_input/src/mouse.rs +++ b/crates/bevy_input/src/mouse.rs @@ -41,7 +41,7 @@ pub struct MouseWheel { pub y: f32, } -/// Updates the Input resource with the latest MouseButtonInput events +/// Updates the `Input` resource with the latest `MouseButtonInput` events pub fn mouse_button_input_system( mut mouse_button_input: ResMut>, mut mouse_button_input_events: EventReader, diff --git a/crates/bevy_input/src/system.rs b/crates/bevy_input/src/system.rs index ed0af87cb57ed..a5270eb83f7c7 100644 --- a/crates/bevy_input/src/system.rs +++ b/crates/bevy_input/src/system.rs @@ -5,7 +5,7 @@ use crate::{ use bevy_app::AppExit; use bevy_ecs::prelude::{EventReader, EventWriter}; -/// Sends the AppExit event whenever the "esc" key is pressed. +/// Sends the `AppExit` event whenever the "esc" key is pressed. pub fn exit_on_esc_system( mut keyboard_input_events: EventReader, mut app_exit_events: EventWriter, diff --git a/crates/bevy_input/src/touch.rs b/crates/bevy_input/src/touch.rs index 9961a084eefe6..44fb2329392e5 100644 --- a/crates/bevy_input/src/touch.rs +++ b/crates/bevy_input/src/touch.rs @@ -220,7 +220,7 @@ impl Touches { } } -/// Updates the Touches resource with the latest TouchInput events +/// Updates the `Touches` resource with the latest `TouchInput` events pub fn touch_screen_input_system( mut touch_state: ResMut, mut touch_input_events: EventReader,