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.
This commit is contained in:
parent
2790b9d240
commit
8aff7262d6
@ -8,9 +8,9 @@ use bevy_utils::{tracing::info, HashMap, HashSet};
|
|||||||
pub struct Gamepad(pub usize);
|
pub struct Gamepad(pub usize);
|
||||||
|
|
||||||
#[derive(Default)]
|
#[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 {
|
pub struct Gamepads {
|
||||||
gamepads: HashSet<Gamepad>,
|
gamepads: HashSet<Gamepad>,
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ pub struct KeyboardInput {
|
|||||||
pub state: ElementState,
|
pub state: ElementState,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates the Input<KeyCode> resource with the latest KeyboardInput events
|
/// Updates the `Input<KeyCode>` resource with the latest `KeyboardInput` events
|
||||||
pub fn keyboard_input_system(
|
pub fn keyboard_input_system(
|
||||||
mut keyboard_input: ResMut<Input<KeyCode>>,
|
mut keyboard_input: ResMut<Input<KeyCode>>,
|
||||||
mut keyboard_input_events: EventReader<KeyboardInput>,
|
mut keyboard_input_events: EventReader<KeyboardInput>,
|
||||||
|
@ -41,7 +41,7 @@ pub struct MouseWheel {
|
|||||||
pub y: f32,
|
pub y: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Updates the Input<MouseButton> resource with the latest MouseButtonInput events
|
/// Updates the `Input<MouseButton>` resource with the latest `MouseButtonInput` events
|
||||||
pub fn mouse_button_input_system(
|
pub fn mouse_button_input_system(
|
||||||
mut mouse_button_input: ResMut<Input<MouseButton>>,
|
mut mouse_button_input: ResMut<Input<MouseButton>>,
|
||||||
mut mouse_button_input_events: EventReader<MouseButtonInput>,
|
mut mouse_button_input_events: EventReader<MouseButtonInput>,
|
||||||
|
@ -5,7 +5,7 @@ use crate::{
|
|||||||
use bevy_app::AppExit;
|
use bevy_app::AppExit;
|
||||||
use bevy_ecs::prelude::{EventReader, EventWriter};
|
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(
|
pub fn exit_on_esc_system(
|
||||||
mut keyboard_input_events: EventReader<KeyboardInput>,
|
mut keyboard_input_events: EventReader<KeyboardInput>,
|
||||||
mut app_exit_events: EventWriter<AppExit>,
|
mut app_exit_events: EventWriter<AppExit>,
|
||||||
|
@ -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(
|
pub fn touch_screen_input_system(
|
||||||
mut touch_state: ResMut<Touches>,
|
mut touch_state: ResMut<Touches>,
|
||||||
mut touch_input_events: EventReader<TouchInput>,
|
mut touch_input_events: EventReader<TouchInput>,
|
||||||
|
Loading…
Reference in New Issue
Block a user