Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs mistake in bevy_ecs::world #17336

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

berylllium
Copy link

Objective

  • Correct a mistake in the rustdoc for bevy_ecs::world::World.

Solution

  • The rustdoc wrongly stated that "Each component can have up to one instance of each component type.". This sentence should presumably be "Each Entity can have up to one instance of each component type.". Applying this change makes the prior sentence "Each [Entity] has a set of components." redundant.

Copy link
Contributor

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

Comment on lines 76 to 77
/// Each [`Entity`] can have up to one instance of each type of component. Entity
/// components can be created, updated, removed, and queried using a given [`World`].
Copy link
Contributor

@LikeLakers2 LikeLakers2 Jan 13, 2025

Choose a reason for hiding this comment

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

Perhaps something like

Each Entity has a set of components, but only one instance of each type of component.

so that it's clear that multiple types of components can exist, but only one of each type.

Suggested change
/// Each [`Entity`] can have up to one instance of each type of component. Entity
/// components can be created, updated, removed, and queried using a given [`World`].
/// Each [`Entity`] has a set of components, but only one instance of each type of
/// component. Entity components can be created, updated, removed, and queried using
/// a given [`World`].

@BenjaminBrienen BenjaminBrienen added C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jan 14, 2025
Co-authored-by: François Mockers <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants