Simplify Scenario geometry admission conditions for strict lint

This commit is contained in:
2026-09-12 23:09:21 -07:00
parent 37be41092b
commit aaf5fec28b
@@ -312,17 +312,14 @@ impl Plan {
..
}),
) = (messages.get(id), occurrence(p, *id))
{
if let Some((previous, previous_y)) =
&& let Some((previous, previous_y)) =
last.insert(*lane, (*id, message.receive_y))
{
if previous_y > message.receive_y {
return Err(GeometryIssue::LifetimeInversionNotSupported {
create: previous,
delete: *id,
});
}
}
&& previous_y > message.receive_y
{
return Err(GeometryIssue::LifetimeInversionNotSupported {
create: previous,
delete: *id,
});
}
}
}
@@ -451,13 +448,13 @@ impl Plan {
after: pair[1],
});
}
if let Some(frame) = frames.get(&pair[0]) {
if frame.y + frame.height > b.y {
diagnostics.push(Diagnostic::FrameExtendsPastFollowingAnchor {
frame: pair[0],
following: pair[1],
});
}
if let Some(frame) = frames.get(&pair[0])
&& frame.y + frame.height > b.y
{
diagnostics.push(Diagnostic::FrameExtendsPastFollowingAnchor {
frame: pair[0],
following: pair[1],
});
}
}
}
@@ -673,15 +670,14 @@ pub(super) fn resolve(
reply_to: Some(call),
..
}) => {
if let Some(start) = plan.messages.get(call) {
if (desired.contains_key(&id) || desired.contains_key(call))
&& message.send_y <= start.receive_y
{
issues.push(GeometryIssue::TypedActivationCrossingNotSupported {
call: *call,
event: id,
});
}
if let Some(start) = plan.messages.get(call)
&& (desired.contains_key(&id) || desired.contains_key(call))
&& message.send_y <= start.receive_y
{
issues.push(GeometryIssue::TypedActivationCrossingNotSupported {
call: *call,
event: id,
});
}
}
_ => {}
@@ -706,15 +702,14 @@ pub(super) fn resolve(
| scenario_activation::Finish::Terminated(event) => Some(event),
_ => None,
};
if let Some(event) = event {
if (desired.contains_key(&event) || desired.contains_key(&segment.call))
&& plan.anchors[&event].y <= start.receive_y
{
issues.push(GeometryIssue::TypedActivationCrossingNotSupported {
call: segment.call,
event,
});
}
if let Some(event) = event
&& (desired.contains_key(&event) || desired.contains_key(&segment.call))
&& plan.anchors[&event].y <= start.receive_y
{
issues.push(GeometryIssue::TypedActivationCrossingNotSupported {
call: segment.call,
event,
});
}
}
if !issues.is_empty() {