diff options
| author | mat <github@matdoes.dev> | 2022-12-03 21:19:27 -0600 |
|---|---|---|
| committer | mat <github@matdoes.dev> | 2022-12-03 21:19:27 -0600 |
| commit | 8e1537ab3b0e1dc136ce1cda3003000c9d2d5975 (patch) | |
| tree | fdeee352482c044df0262da3a9db8888453658e7 | |
| parent | 3b93fc641250c4d01ab7f0764b7d5faec2f8ae5b (diff) | |
| download | azalea-drasl-8e1537ab3b0e1dc136ce1cda3003000c9d2d5975.tar.xz | |
Fix example in azalea-world
| -rwxr-xr-x | azalea-world/src/entity_storage.rs | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/azalea-world/src/entity_storage.rs b/azalea-world/src/entity_storage.rs index c8c58a75..4826abdb 100755 --- a/azalea-world/src/entity_storage.rs +++ b/azalea-world/src/entity_storage.rs @@ -327,14 +327,19 @@ impl WeakEntityStorage { /// # Examples /// /// ```rust - /// let mut storage = EntityStorage::new(); - /// storage.insert( + /// # use std::sync::Arc; + /// # use azalea_world::{PartialEntityStorage, entity::{EntityData, EntityMetadata, metadata}}; + /// # use azalea_core::Vec3; + /// # use uuid::Uuid; + /// # + /// let mut storage = PartialEntityStorage::default(); + /// storage.insert( /// 0, - /// Arc::new(EntityData::new( - /// uuid, + /// EntityData::new( + /// Uuid::nil(), /// Vec3::default(), - /// EntityMetadata::Player(metadata::Player::default()), - /// )), + /// EntityMetadata::Player(metadata::Player::default()), + /// ), /// ); /// for entity in storage.shared.read().entities() { /// if let Some(entity) = entity.upgrade() { |
