Skip to content

Commit 7203f9e

Browse files
committed
aaa
1 parent 92f21f9 commit 7203f9e

File tree

1 file changed

+3
-3
lines changed
  • crates/bevy_ecs/src/world

1 file changed

+3
-3
lines changed

crates/bevy_ecs/src/world/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ impl World {
197197
/// .insert(Position { x: 0.0, y: 0.0 })
198198
/// .id();
199199
///
200-
/// let position = world.entity(entity).entity_ref.get::<Position>().unwrap();
200+
/// let position = world.entity(entity).get::<Position>().unwrap();
201201
/// assert_eq!(position.x, 0.0);
202202
/// ```
203203
#[inline]
@@ -337,7 +337,7 @@ impl World {
337337
/// .insert_bundle((Num(1), Label("hello"))) // add a bundle of components
338338
/// .id();
339339
///
340-
/// let position = world.entity(entity).entity_ref.get::<Position>().unwrap();
340+
/// let position = world.entity(entity).get::<Position>().unwrap();
341341
/// assert_eq!(position.x, 0.0);
342342
/// ```
343343
pub fn spawn(&mut self) -> EntityMut {
@@ -414,7 +414,7 @@ impl World {
414414
/// ```
415415
#[inline]
416416
pub fn get<T: Component>(&self, entity: Entity) -> Option<&T> {
417-
self.get_entity(entity)?.get::<T>()
417+
self.get_entity(entity)?.get()
418418
}
419419

420420
/// Retrieves a mutable reference to the given `entity`'s [Component] of the given type.

0 commit comments

Comments
 (0)