Skip to content

Commit

Permalink
do not unwrap in doc example
Browse files Browse the repository at this point in the history
  • Loading branch information
mockersf committed Dec 30, 2021
1 parent d1f37cd commit 2ca5481
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/bevy_ecs/src/schedule/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ where
/// # }
/// #
/// fn change_state(mut state: ResMut<State<AppState>>) {
/// state.set(AppState::Game).unwrap().end_frame();
/// if let Ok(transition) = state.set(AppState::Game) {
/// transition.end_frame();
/// }
/// }
/// # change_state.system();
/// ```
Expand Down

0 comments on commit 2ca5481

Please sign in to comment.