From 96b2eecb5d552fb76632544af33013741904e2c8 Mon Sep 17 00:00:00 2001 From: willolisp Date: Wed, 8 Sep 2021 09:44:00 -0300 Subject: [PATCH] Fix to `World`'s docstrings --- crates/bevy_ecs/src/world/mod.rs | 2 ++ 1 file changed, 2 insertions(+) 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()