aboutsummaryrefslogtreecommitdiff
path: root/azalea-physics/src/clip.rs
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-05-30 19:36:59 -0800
committermat <git@matdoes.dev>2025-05-30 19:36:59 -0800
commitae4b1e85e669bc882d158509ef1eda46c6b2a72e (patch)
treeadf81cc01b0ce1575e95b99ad109fd92db1738f6 /azalea-physics/src/clip.rs
parenta64c6505049082175224802c5be51ac8f0cf4677 (diff)
downloadazalea-drasl-ae4b1e85e669bc882d158509ef1eda46c6b2a72e.tar.xz
fix clippy issues and improve formatting everywhere
Diffstat (limited to 'azalea-physics/src/clip.rs')
-rw-r--r--azalea-physics/src/clip.rs9
1 files changed, 4 insertions, 5 deletions
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)