From 5ce4b9585db5ccef804b59ff7aa8e174bf20aee0 Mon Sep 17 00:00:00 2001 From: Ludovic Marie <136255825+ludovic111@users.noreply.github.com> Date: Tue, 13 Oct 2026 00:51:30 +0200 Subject: [PATCH] Satisfy clippy Co-Authored-By: Claude Opus 5.5 --- crates/horizon-client/examples/mob_ai_probe.rs | 2 +- crates/horizon-client/src/mobs/villager_brain.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/horizon-client/examples/mob_ai_probe.rs b/crates/horizon-client/examples/mob_ai_probe.rs index b0b09581e..729ac88f1 100644 --- a/crates/horizon-client/examples/mob_ai_probe.rs +++ b/crates/horizon-client/examples/mob_ai_probe.rs @@ -280,7 +280,7 @@ fn spawn_seed(index: usize) -> i64 { /// Villager events that act at once in vanilla (`TradeWithVillager` and /// `VillagerMakeLove` write the other villager directly). fn villager_events( - mobs: &mut Vec, + mobs: &mut [Mob], events: &mut Vec, from: usize, w: &MobWorld, diff --git a/crates/horizon-client/src/mobs/villager_brain.rs b/crates/horizon-client/src/mobs/villager_brain.rs index 7bd33c89f..4d94ca2bb 100644 --- a/crates/horizon-client/src/mobs/villager_brain.rs +++ b/crates/horizon-client/src/mobs/villager_brain.rs @@ -4142,7 +4142,11 @@ pub fn seen_memories( let Some(mm) = mem_ref(m) else { return (None, None, false, None); }; - let path = mm.path.present().then(|| m.ai.nav.path.as_ref()).flatten(); + let path = mm + .path + .present() + .then_some(m.ai.nav.path.as_ref()) + .flatten(); let nodes = path.filter(|p| !p.is_done()).map(|p| { let n = |i: usize| [p.nodes[i].x, p.nodes[i].y, p.nodes[i].z]; ((p.next > 0).then(|| n(p.next - 1)), n(p.next))