From c2ca101be0129d0618953b6b711e9ccd6d00bfe0 Mon Sep 17 00:00:00 2001 From: Alice Cecile Date: Thu, 18 Jul 2024 17:07:19 -0400 Subject: [PATCH] Fix doc links --- src/action_state/mod.rs | 2 +- src/clashing_inputs.rs | 14 +++++++------- src/input_map.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/action_state/mod.rs b/src/action_state/mod.rs index d4306588..7bc5d6bc 100644 --- a/src/action_state/mod.rs +++ b/src/action_state/mod.rs @@ -616,7 +616,7 @@ impl ActionState { action_data.state.release(); } - /// Releases all [`Buttonlike`] actions + /// Releases all [`Buttonlike`](crate::user_input::Buttonlike) actions pub fn release_all(&mut self) { // Collect out to avoid angering the borrow checker let buttonlike_actions = self.button_data.keys().cloned().collect::>(); diff --git a/src/clashing_inputs.rs b/src/clashing_inputs.rs index 2abff397..4a4cd8a7 100644 --- a/src/clashing_inputs.rs +++ b/src/clashing_inputs.rs @@ -49,7 +49,7 @@ impl ClashStrategy { } } -/// A flat list of the [`Buttonlike`] inputs that make up a [`UserInput`]. +/// A flat list of the [`Buttonlike`] inputs that make up a [`UserInput`](crate::user_input::UserInput). /// /// This is used to check for potential clashes between actions, /// where one action is a strict subset of another. @@ -61,25 +61,25 @@ pub enum BasicInputs { /// This might be used for things like a joystick axis. None, - /// The input consists of a single, fundamental [`Buttonlike`] [`UserInput`]. + /// The input consists of a single, fundamental [`Buttonlike`] [`UserInput`](crate::user_input::UserInput). /// /// For example, a single key press. Simple(Box), - /// The input can be triggered by multiple independent [`Buttonlike`] [`UserInput`]s, + /// The input can be triggered by multiple independent [`Buttonlike`] [`UserInput`](crate::user_input::UserInput)s, /// but is still fundamentally considered a single input. /// /// For example, a virtual D-Pad is only one input, but can be triggered by multiple keys. Composite(Vec>), - /// The input represents one or more independent [`Buttonlike`] [`UserInput`] types. + /// The input represents one or more independent [`Buttonlike`] [`UserInput`](crate::user_input::UserInput) types. /// /// For example, a chorded input is a group of multiple keys that must be pressed together. Chord(Vec>), } impl BasicInputs { - /// Returns a list of the underlying [`Buttonlike`] [`UserInput`]s. + /// Returns a list of the underlying [`Buttonlike`] [`UserInput`](crate::user_input::UserInput)s. /// /// # Warning /// @@ -102,7 +102,7 @@ impl BasicInputs { BasicInputs::Composite(combined_inputs) } - /// Returns the number of the logical [`UserInput`]s that make up the input. + /// Returns the number of the logical [`Buttonlike`] [`UserInput`](crate::user_input::UserInput)s that make up the input. /// /// A single key press is one input, while a chorded input is multiple inputs. /// A composite input is still considered one input, even if it can be triggered by multiple keys, @@ -202,7 +202,7 @@ impl InputMap { /// Gets the set of clashing action-input pairs /// - /// Returns both the action and [`UserInput`]s for each clashing set + /// Returns both the action and [`UserInput`](crate::user_input::UserInput)s for each clashing set #[must_use] fn get_clashes( &self, diff --git a/src/input_map.rs b/src/input_map.rs index 17b10788..27ad4f31 100644 --- a/src/input_map.rs +++ b/src/input_map.rs @@ -597,7 +597,7 @@ impl InputMap { self.dual_axislike_map.keys() } - /// Returns a reference to the [`UserInput`] inputs associated with the given `action`. + /// Returns a reference to the [`UserInput`](crate::user_input::UserInput) inputs associated with the given `action`. /// /// # Warning ///