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