test: satisfy strict navigation usage lints

This commit is contained in:
2026-09-12 19:14:44 -07:00
parent 10bd711972
commit a49b0ec7ac
2 changed files with 7 additions and 8 deletions
@@ -1029,10 +1029,9 @@ fn repeated_preview_arrows_select_the_relation_and_highlight_the_exact_caller_li
let camera = app.behavior.topology.camera_boundary();
if call == calls[1]
&& let Some((previous_call, previous)) = &previous_camera
&& *previous_call != call
{
if *previous_call != call {
assert!(&camera != previous);
}
assert!(&camera != previous);
}
if let Some(epoch) = previous_epoch {
assert_ne!(app.canvas_epoch, epoch);
@@ -1375,7 +1374,7 @@ fn whole_surface_camera_fits_huge_extent_while_target_camera_remains_readable()
};
let viewport = iced::Size::new(800., 500.);
let (zoom, pan) = usage::camera_for(&Target::Whole, bounds, viewport);
assert!(zoom < 0.05 && zoom >= 0.0001);
assert!((0.0001..0.05).contains(&zoom));
assert!(bounds.width * zoom <= viewport.width - 64. + 0.01);
assert!(bounds.height * zoom <= viewport.height - 64. + 0.01);
assert!((bounds.center_x() * zoom + pan.x - viewport.width / 2.).abs() < 0.01);
@@ -10,10 +10,10 @@ fn add_occurrence(p: &mut Project, owner: Id, name: &str, body: OccurrenceBody)
precondition: String::new(),
postcondition: String::new(),
};
if let Some(steps) = p.elements.get_mut(&owner).unwrap().steps_mut() {
if !steps.contains(&id) {
steps.push(id);
}
if let Some(steps) = p.elements.get_mut(&owner).unwrap().steps_mut()
&& !steps.contains(&id)
{
steps.push(id);
}
id
}