clippyyyyy

This commit is contained in:
Isse 2023-11-06 07:30:36 +01:00
parent 7a1612aa8a
commit 96a70d760c
2 changed files with 8 additions and 8 deletions

View File

@ -325,7 +325,9 @@ impl Rule for NpcAi {
}
}
fn idle<S: State>() -> impl Action<S> + Clone { just(|ctx, _| ctx.controller.do_idle()).debug(|| "idle") }
fn idle<S: State>() -> impl Action<S> + Clone {
just(|ctx, _| ctx.controller.do_idle()).debug(|| "idle")
}
/// Try to walk toward a 3D position without caring for obstacles.
fn goto<S: State>(wpos: Vec3<f32>, speed_factor: f32, goal_dist: f32) -> impl Action<S> {

View File

@ -302,7 +302,7 @@ impl Tavern {
min: aabr.min - amount,
max: aabr.max + amount,
};
'room_gen: while room_metas.len() > 0 {
'room_gen: while !room_metas.is_empty() {
// Continue extending from a random existing room
let mut room_meta = room_metas.swap_remove(rng.gen_range(0..room_metas.len()));
if room_meta.walls.is_empty() {
@ -683,12 +683,10 @@ impl Tavern {
continue 'y_loop;
}
if contains_x && min.y < area.min.y {
if area.min.y - 1 < max_y {
if contains_x && min.y < area.min.y && area.min.y - 1 < max_y {
max_y = area.min.y - 1;
}
}
}
let max_x = avoid
.iter()