From ae4b1e85e669bc882d158509ef1eda46c6b2a72e Mon Sep 17 00:00:00 2001 From: mat Date: Fri, 30 May 2025 19:36:59 -0800 Subject: fix clippy issues and improve formatting everywhere --- azalea-physics/src/clip.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'azalea-physics/src/clip.rs') diff --git a/azalea-physics/src/clip.rs b/azalea-physics/src/clip.rs index e557b028..e7d203d8 100644 --- a/azalea-physics/src/clip.rs +++ b/azalea-physics/src/clip.rs @@ -151,12 +151,11 @@ fn clip_with_interaction_override( // compostors, hoppers, and scaffolding. let interaction_shape = &*EMPTY_SHAPE; let interaction_hit_result = interaction_shape.clip(from, to, block_pos); - if let Some(interaction_hit_result) = interaction_hit_result { - if interaction_hit_result.location.distance_squared_to(from) + if let Some(interaction_hit_result) = interaction_hit_result + && interaction_hit_result.location.distance_squared_to(from) < block_hit_result.location.distance_squared_to(from) - { - return Some(block_hit_result.with_direction(interaction_hit_result.direction)); - } + { + return Some(block_hit_result.with_direction(interaction_hit_result.direction)); } Some(block_hit_result) -- cgit v1.2.3