Skip to content

Commit

Permalink
fix dead intra links in doc on Input and Reflect (#2007)
Browse files Browse the repository at this point in the history
fix a few dead links

* Links in `Input` missed a refactor
* `Reflect::downcast` can't use the intra doc link format, as it's not a link to a trait function, but to a function implemented on `dyn Reflect`

noticed in #1781 (comment)
  • Loading branch information
mockersf committed Apr 25, 2021
1 parent 0a8576b commit fcf8faf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_input/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use bevy_ecs::schedule::State;
/// but only one should react, for example in the case of triggering
/// [`State`] change, you should consider clearing the input state, either by:
///
/// * Using [`Input::just_pressed_and_clear`] or [`Input::just_released_and_clear`] instead.
/// * Using [`Input::clear_just_pressed`] or [`Input::clear_just_released`] instead.
/// * Calling [`Input::clear`] or [`Input::reset`] immediately after the state change.
///
/// ## Notes when adding this resource for a new input type
Expand Down
6 changes: 3 additions & 3 deletions crates/bevy_reflect/src/reflect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ pub enum ReflectMut<'a> {
/// A reflected rust type.
///
/// # Safety
/// Implementors _must_ ensure that [Reflect::any] and [Reflect::any_mut] both return the `self`
/// value passed in If this is not done, [Reflect::downcast] will be UB (and also just logically
/// broken).
/// Implementors _must_ ensure that [`Reflect::any`] and [`Reflect::any_mut`] both return the `self`
/// value passed in If this is not done, [`Reflect::downcast`](trait.Reflect.html#method.downcast)
/// will be UB (and also just logically broken).
pub unsafe trait Reflect: Any + Send + Sync {
fn type_name(&self) -> &str;
fn any(&self) -> &dyn Any;
Expand Down

0 comments on commit fcf8faf

Please sign in to comment.