Skip to content

Commit 5bab161

Browse files
docs(bevy_state): fix broken links in init_state and insert_state (#13929)
# Objective Fixes #13845 ## Solution Fix inline docs links inside `init_state` and `insert_state`. ## Testing - Did you test these changes? If so, how? Manually checked on `cargo doc` and  `rust-analyzer lsp`.
1 parent 6df0e9b commit 5bab161

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

crates/bevy_state/src/app.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,29 @@ pub trait AppExtStates {
1818
///
1919
/// This method is idempotent: it has no effect when called again using the same generic type.
2020
///
21-
/// Adds [`State<S>`] and [`NextState<S>`] resources, and enables use of the [`OnEnter`], [`OnTransition`] and [`OnExit`] schedules.
22-
/// These schedules are triggered before [`Update`](crate::Update) and at startup.
21+
/// Adds [`State<S>`] and [`NextState<S>`] resources, and enables use of the [`OnEnter`](crate::state::OnEnter),
22+
/// [`OnTransition`](crate::state::OnTransition) and [`OnExit`](crate::state::OnExit) schedules.
23+
/// These schedules are triggered before [`Update`](bevy_app::main_schedule::Update) and at startup.
2324
///
2425
/// If you would like to control how other systems run based on the current state, you can
25-
/// emulate this behavior using the [`in_state`] [`Condition`].
26+
/// emulate this behavior using the [`in_state`](crate::condition::in_state) [`Condition`](bevy_ecs::prelude::Condition).
2627
///
2728
/// Note that you can also apply state transitions at other points in the schedule
28-
/// by triggering the [`StateTransition`](`bevy_ecs::schedule::StateTransition`) schedule manually.
29+
/// by triggering the [`StateTransition`](struct@StateTransition) schedule manually.
2930
fn init_state<S: FreelyMutableState + FromWorld>(&mut self) -> &mut Self;
3031

3132
/// Inserts a specific [`State`] to the current [`App`] and overrides any [`State`] previously
3233
/// added of the same type.
3334
///
34-
/// Adds [`State<S>`] and [`NextState<S>`] resources, and enables use of the [`OnEnter`], [`OnTransition`] and [`OnExit`] schedules.
35-
/// These schedules are triggered before [`Update`](crate::Update) and at startup.
35+
/// Adds [`State<S>`] and [`NextState<S>`] resources, and enables use of the [`OnEnter`](crate::state::OnEnter),
36+
/// [`OnTransition`](crate::state::OnTransition) and [`OnExit`](crate::state::OnExit) schedules.
37+
/// These schedules are triggered before [`Update`](bevy_app::main_schedule::Update) and at startup.
3638
///
3739
/// If you would like to control how other systems run based on the current state, you can
38-
/// emulate this behavior using the [`in_state`] [`Condition`].
40+
/// emulate this behavior using the [`in_state`](crate::condition::in_state) [`Condition`](bevy_ecs::prelude::Condition).
3941
///
4042
/// Note that you can also apply state transitions at other points in the schedule
41-
/// by triggering the [`StateTransition`](`bevy_ecs::schedule::StateTransition`) schedule manually.
43+
/// by triggering the [`StateTransition`](struct@StateTransition) schedule manually.
4244
fn insert_state<S: FreelyMutableState>(&mut self, state: S) -> &mut Self;
4345

4446
/// Sets up a type implementing [`ComputedStates`].

0 commit comments

Comments
 (0)