From ee2575794e91b9457a74a95daf1dcc707058cd58 Mon Sep 17 00:00:00 2001 From: mat Date: Sun, 12 Oct 2025 23:01:54 +0300 Subject: upgrade deps and clean up lots of doc comments --- azalea/src/nearest_entity.rs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'azalea/src/nearest_entity.rs') diff --git a/azalea/src/nearest_entity.rs b/azalea/src/nearest_entity.rs index 2c01e5df..6e94e331 100644 --- a/azalea/src/nearest_entity.rs +++ b/azalea/src/nearest_entity.rs @@ -65,6 +65,7 @@ where F: QueryFilter + 'static, { /// Gets the nearest entity to the given position and world instance name. + /// /// This method will return `None` if there are no entities within range. If /// multiple entities are within range, only the closest one is returned. pub fn nearest_to_position( @@ -91,9 +92,11 @@ where nearest_entity } - /// Gets the nearest entity to the given entity. This method will return - /// `None` if there are no entities within range. If multiple entities are - /// within range, only the closest one is returned. + /// Gets the nearest entity to the given entity. + /// + /// This method will return `None` if there are no entities within range. If + /// multiple entities are within range, only the closest one is + /// returned. pub fn nearest_to_entity(&'a self, entity: Entity, max_distance: f64) -> Option { let Ok((position, instance_name)) = self.all_entities.get(entity) else { return None; @@ -122,8 +125,9 @@ where } /// This function get an iterator over all nearby entities to the given - /// position within the given maximum distance. The entities in this - /// iterator are not returned in any specific order. + /// position within the given maximum distance. + /// + /// The entities in this iterator are not returned in any specific order. /// /// This function returns the Entity ID of nearby entities and their /// distance away. @@ -150,8 +154,9 @@ where } /// This function get an iterator over all nearby entities to the given - /// entity within the given maximum distance. The entities in this iterator - /// are not returned in any specific order. + /// entity within the given maximum distance. + /// + /// The entities in this iterator are not returned in any specific order. /// /// This function returns the Entity ID of nearby entities and their /// distance away. -- cgit v1.2.3