diff --git a/crates/bevy_ecs/src/world/mod.rs b/crates/bevy_ecs/src/world/mod.rs index 121951dddaa02..f4a542b7f13a6 100644 --- a/crates/bevy_ecs/src/world/mod.rs +++ b/crates/bevy_ecs/src/world/mod.rs @@ -383,6 +383,7 @@ impl World { /// .id(); /// let position = world.get::(entity).unwrap(); /// assert_eq!(position.x, 0.0); + /// ``` #[inline] pub fn get(&self, entity: Entity) -> Option<&T> { self.get_entity(entity)?.get() @@ -404,6 +405,7 @@ impl World { /// .id(); /// let mut position = world.get_mut::(entity).unwrap(); /// position.x = 1.0; + /// ``` #[inline] pub fn get_mut(&mut self, entity: Entity) -> Option> { self.get_entity_mut(entity)?.get_mut()