1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 14:26:04 +00:00

Fix example in azalea-world

This commit is contained in:
mat 2022-12-03 21:19:27 -06:00
parent 3b93fc6412
commit 8e1537ab3b

View file

@ -327,14 +327,19 @@ impl WeakEntityStorage {
/// # Examples /// # Examples
/// ///
/// ```rust /// ```rust
/// let mut storage = EntityStorage::new(); /// # use std::sync::Arc;
/// storage.insert( /// # use azalea_world::{PartialEntityStorage, entity::{EntityData, EntityMetadata, metadata}};
/// # use azalea_core::Vec3;
/// # use uuid::Uuid;
/// #
/// let mut storage = PartialEntityStorage::default();
/// storage.insert(
/// 0, /// 0,
/// Arc::new(EntityData::new( /// EntityData::new(
/// uuid, /// Uuid::nil(),
/// Vec3::default(), /// Vec3::default(),
/// EntityMetadata::Player(metadata::Player::default()), /// EntityMetadata::Player(metadata::Player::default()),
/// )), /// ),
/// ); /// );
/// for entity in storage.shared.read().entities() { /// for entity in storage.shared.read().entities() {
/// if let Some(entity) = entity.upgrade() { /// if let Some(entity) = entity.upgrade() {