Satisfy clippy

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ludovic Marie
2026-10-13 00:51:30 +02:00
parent 389d2f9549
commit 5ce4b9585d
2 changed files with 6 additions and 2 deletions
@@ -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<Mob>,
mobs: &mut [Mob],
events: &mut Vec<MobEvent>,
from: usize,
w: &MobWorld,
@@ -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))