ui: collapse the Relax-around-worst-element condition (clippy)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-15 15:22:18 -04:00
1 parent 5a0605741b
commit c012a9e442
1 file changed
+4 -5
+4 -5
View File
@@ -393,14 +393,13 @@ fn quality(ui: &mut egui::Ui, t: &Tokens, v: &Value, acts: &mut Vec<Act>) {
acts.push(Act::Elements(l));
}
}
if let Some(worst) = v.pointer("/metrics/scaled_jacobian/worst").and_then(Value::as_u64).and_then(|w| u32::try_from(w).ok()) {
if ui
if let Some(worst) = v.pointer("/metrics/scaled_jacobian/worst").and_then(Value::as_u64).and_then(|w| u32::try_from(w).ok())
&& ui
.button("Relax around worst element")
.on_hover_text("Open Relax Nodes with its sphere round the element of smallest scaled Jacobian; preview, then OK")
.clicked()
{
acts.push(Act::Relax(worst));
}
{
acts.push(Act::Relax(worst));
}
for (key, label, low_bad) in METRICS {
let Some(m) = v.pointer(&format!("/metrics/{key}")).filter(|m| m.is_object()) else { continue };