aboutsummaryrefslogtreecommitdiff
path: root/azalea-world/src/entity
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-world/src/entity')
-rw-r--r--azalea-world/src/entity/attributes.rs2
-rw-r--r--azalea-world/src/entity/mod.rs13
2 files changed, 3 insertions, 12 deletions
diff --git a/azalea-world/src/entity/attributes.rs b/azalea-world/src/entity/attributes.rs
index f7e9682e..fca6b88f 100644
--- a/azalea-world/src/entity/attributes.rs
+++ b/azalea-world/src/entity/attributes.rs
@@ -1,4 +1,4 @@
-//! https://minecraft.fandom.com/wiki/Attribute
+//! <https://minecraft.fandom.com/wiki/Attribute>
use std::{
collections::HashMap,
diff --git a/azalea-world/src/entity/mod.rs b/azalea-world/src/entity/mod.rs
index 4611f215..dbf7e665 100644
--- a/azalea-world/src/entity/mod.rs
+++ b/azalea-world/src/entity/mod.rs
@@ -270,20 +270,11 @@ impl EntityData {
&self.pos
}
- /// Convert this &mut self into a (mutable) pointer.
- ///
- /// # Safety
- /// The entity MUST exist while this pointer exists.
- pub unsafe fn as_ptr(&mut self) -> NonNull<EntityData> {
- NonNull::new_unchecked(self as *mut EntityData)
- }
-
/// Convert this &self into a (mutable) pointer.
///
/// # Safety
- /// The entity MUST exist while this pointer exists. You also must not
- /// modify the data inside the pointer.
- pub unsafe fn as_const_ptr(&self) -> NonNull<EntityData> {
+ /// The entity MUST exist for at least as long as this pointer exists.
+ pub unsafe fn as_ptr(&self) -> NonNull<EntityData> {
// this is cursed
NonNull::new_unchecked(self as *const EntityData as *mut EntityData)
}