Skip to content

Improve document for App::update()#24754

Open
TheCGDF wants to merge 2 commits into
bevyengine:mainfrom
TheCGDF:main
Open

Improve document for App::update()#24754
TheCGDF wants to merge 2 commits into
bevyengine:mainfrom
TheCGDF:main

Conversation

@TheCGDF

@TheCGDF TheCGDF commented Jun 25, 2026

Copy link
Copy Markdown

Objective

Solution

  • Supplement that should_exit() should be called after update(), with example code.

Copilot AI review requested due to automatic review settings June 25, 2026 19:39
@github-actions

Copy link
Copy Markdown
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide, as well as our policy regarding AI usage, and we look forward to reviewing your pull request shortly ✨

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the App::update() API documentation in bevy_app by explaining the common manual-driving pattern where callers should check for an AppExit after running an update tick.

Changes:

  • Adds a note that should_exit() is typically checked after update() when driving the app manually.
  • Adds an example showing how to call update() and then handle AppExit via should_exit().

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 163 to +166
/// Runs the default schedules of all sub-apps (starting with the "main" app) once.
///
/// [`should_exit()`](App::should_exit) should be called after every [`update()`](App::update).
///
///
/// # Examples
///
/// ```
@TheCGDF TheCGDF closed this Jun 25, 2026
@TheCGDF TheCGDF reopened this Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants