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

Incorrect doc syntax on World get and get_mut #2787

Closed
afonsolage opened this issue Sep 7, 2021 · 2 comments
Closed

Incorrect doc syntax on World get and get_mut #2787

afonsolage opened this issue Sep 7, 2021 · 2 comments
Labels
C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@afonsolage
Copy link
Contributor

How can Bevy's documentation be improved?

Just noticed that World.get and World.get_mut docs are missing the closing ```

/// ```
/// use bevy_ecs::world::World;
///
/// struct Position {
/// x: f32,
/// y: f32,
/// }
///
/// let mut world = World::new();
/// let entity = world.spawn()
/// .insert(Position { x: 0.0, y: 0.0 })
/// .id();
/// let position = world.get::<Position>(entity).unwrap();
/// assert_eq!(position.x, 0.0);
#[inline]

/// ```
/// use bevy_ecs::world::World;
///
/// struct Position {
/// x: f32,
/// y: f32,
/// }
///
/// let mut world = World::new();
/// let entity = world.spawn()
/// .insert(Position { x: 0.0, y: 0.0 })
/// .id();
/// let mut position = world.get_mut::<Position>(entity).unwrap();
/// position.x = 1.0;
#[inline]

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy labels Sep 7, 2021
@alice-i-cecile
Copy link
Member

If you're tackling this, make sure to check for conflicts with #2365.

@afonsolage
Copy link
Contributor Author

Checked and seems to have no conflict, but if no ones picks it until the weekend, I may address it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants