ui: rustfmt the context-menu instance check (CI gate fix)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Mojtaba Jafarzadeh
2026-10-26 11:18:48 +03:30
co-authored by Claude
parent 65d270dd42
commit c73ff432cb
+6 -3
View File
@@ -1021,9 +1021,12 @@ pub fn popups(app: &mut FigApp, ctx: &egui::Context) {
}
// An instance's actions reach its main component: replace "Create component" with
// "Go to main component" (as in Figma's context menu).
if app.session.doc().ok().is_some_and(|doc| {
ids.iter().any(|i| doc.node(*i).is_some_and(|n| matches!(n.kind, figcraft_doc::NodeKind::Instance { .. })))
}) && let Some(at) = entries.iter().position(|e| e.1 == "component.create")
if app
.session
.doc()
.ok()
.is_some_and(|doc| ids.iter().any(|i| doc.node(*i).is_some_and(|n| matches!(n.kind, figcraft_doc::NodeKind::Instance { .. }))))
&& let Some(at) = entries.iter().position(|e| e.1 == "component.create")
{
entries[at] = (tr("Go to main component"), "component.goToMain");
}