File tree 1 file changed +3
-3
lines changed
crates/bevy_ecs/src/world
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ impl World {
197
197
/// .insert(Position { x: 0.0, y: 0.0 })
198
198
/// .id();
199
199
///
200
- /// let position = world.entity(entity).entity_ref. get::<Position>().unwrap();
200
+ /// let position = world.entity(entity).get::<Position>().unwrap();
201
201
/// assert_eq!(position.x, 0.0);
202
202
/// ```
203
203
#[ inline]
@@ -337,7 +337,7 @@ impl World {
337
337
/// .insert_bundle((Num(1), Label("hello"))) // add a bundle of components
338
338
/// .id();
339
339
///
340
- /// let position = world.entity(entity).entity_ref. get::<Position>().unwrap();
340
+ /// let position = world.entity(entity).get::<Position>().unwrap();
341
341
/// assert_eq!(position.x, 0.0);
342
342
/// ```
343
343
pub fn spawn ( & mut self ) -> EntityMut {
@@ -414,7 +414,7 @@ impl World {
414
414
/// ```
415
415
#[ inline]
416
416
pub fn get < T : Component > ( & self , entity : Entity ) -> Option < & T > {
417
- self . get_entity ( entity) ?. get :: < T > ( )
417
+ self . get_entity ( entity) ?. get ( )
418
418
}
419
419
420
420
/// Retrieves a mutable reference to the given `entity`'s [Component] of the given type.
You can’t perform that action at this time.
0 commit comments