From 8f0c79b20988fd7708f4764a9ce6d0d7e776374c Mon Sep 17 00:00:00 2001 From: jyviko <2501648+jyviko@users.noreply.github.com> Date: Mon, 2 Nov 2026 10:30:35 -0500 Subject: [PATCH] After the merge: main's two new tests take world_state's Result, as the rest of their files do Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01DtL5M41G8Nua7HvuFPZkmJ --- crates/engine/src/cmd/occurrence_tests.rs | 2 +- crates/ui-egui/src/browser_card_tests.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/cmd/occurrence_tests.rs b/crates/engine/src/cmd/occurrence_tests.rs index 9e9bb5c6e..c23ef3005 100644 --- a/crates/engine/src/cmd/occurrence_tests.rs +++ b/crates/engine/src/cmd/occurrence_tests.rs @@ -1320,7 +1320,7 @@ fn reparent_carries_a_sketch_on_a_face_inside_the_moved_part() { run(&mut s, "sketch.circle.center", json!({"center": [0, 0], "radius": 3})); run(&mut s, "sketch.finish", json!({})); run(&mut s, "solid.extrude", json!({"sketch": "Sketch2", "distance": -3, "operation": "cut"})); - let volume = |s: &Session| s.world_state().bodies.iter().map(|b| b.mesh().measure().volume.abs()).sum::(); + let volume = |s: &Session| s.world_state().unwrap().bodies.iter().map(|b| b.mesh().measure().volume.abs()).sum::(); let before = volume(&s); let r = run(&mut s, "occurrence.reparent", json!({"occurrence": "Component2:1", "parent": "Component1"})); assert_eq!(r["path"].as_array().map(Vec::len), Some(2), "{r}"); diff --git a/crates/ui-egui/src/browser_card_tests.rs b/crates/ui-egui/src/browser_card_tests.rs index 957954b9e..6053f14ed 100644 --- a/crates/ui-egui/src/browser_card_tests.rs +++ b/crates/ui-egui/src/browser_card_tests.rs @@ -128,7 +128,7 @@ fn a_refused_inline_rename_keeps_the_editor_and_shows_the_error() { assert!(h.app.menu.rename.is_some(), "the editor stays open after a refused rename"); let (text, _, error) = h.app.status.clone().expect("the refusal is shown"); assert!(error && text.contains("another body is called"), "{text}"); - assert!(h.app.session.world_state().body("B").is_some(), "the body keeps its name"); + assert!(h.app.session.world_state().unwrap().body("B").is_some(), "the body keeps its name"); } #[test]