From a12242c80618965dc677fddff6eba9730010a3c5 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 10 Oct 2026 12:49:52 +0000 Subject: [PATCH] Format the merged community fixes (#561-#566 follow-up) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f --- apps/effectcraft/src/main.rs | 5 +--- crates/engine/src/commands/render_queue.rs | 3 +- crates/engine/src/rq_tests.rs | 5 +--- crates/engine/src/tests.rs | 5 +--- crates/expr/src/tests.rs | 35 +++++----------------- 5 files changed, 12 insertions(+), 41 deletions(-) diff --git a/apps/effectcraft/src/main.rs b/apps/effectcraft/src/main.rs index 52782349..36ed332c 100644 --- a/apps/effectcraft/src/main.rs +++ b/apps/effectcraft/src/main.rs @@ -373,10 +373,7 @@ mod tests { } let files = ["scene.ecprojx".to_string(), "clip.mov".to_string()]; assert_eq!(files.iter().find(|f| super::is_project_file(f)).map(String::as_str), Some("scene.ecprojx")); - assert_eq!( - files.iter().filter(|f| !super::is_project_file(f)).map(String::as_str).collect::>(), - vec!["clip.mov"], - ); + assert_eq!(files.iter().filter(|f| !super::is_project_file(f)).map(String::as_str).collect::>(), vec!["clip.mov"],); } /// Launching without a project opens an empty project, not the demo (#204). diff --git a/crates/engine/src/commands/render_queue.rs b/crates/engine/src/commands/render_queue.rs index 0ec285ec..d167df9a 100644 --- a/crates/engine/src/commands/render_queue.rs +++ b/crates/engine/src/commands/render_queue.rs @@ -592,7 +592,8 @@ fn set_output_module(s: &mut Session, p: &Value) -> Result { // When aspect is locked, an explicit height-only edit must drive the size. // frame_size() derives height from width; calculate the matching width from the // cropped render bounds before storing the updated module. - let width_given = p.get("resizeWidth").is_some() || p.get("resize").and_then(Value::as_object).is_some_and(|r| r.contains_key("width") || r.contains_key("preset")); + let width_given = + p.get("resizeWidth").is_some() || p.get("resize").and_then(Value::as_object).is_some_and(|r| r.contains_key("width") || r.contains_key("preset")); let height_given = p.get("resizeHeight").is_some() || p.get("resize").and_then(Value::as_object).is_some_and(|r| r.contains_key("height")); if om.resize.enabled && om.resize.lock_aspect && height_given && !width_given { let item = &s.project.render_queue[i]; diff --git a/crates/engine/src/rq_tests.rs b/crates/engine/src/rq_tests.rs index 61207949..fe376668 100644 --- a/crates/engine/src/rq_tests.rs +++ b/crates/engine/src/rq_tests.rs @@ -186,10 +186,7 @@ fn queue_add_accepts_render_settings_templates_without_output_module_namesakes() #[test] fn locked_resize_uses_height_for_height_only_output_module_updates() { - for change in [ - json!({"resizeHeight": 32}), - json!({"resize": {"height": 32, "lockAspect": true}}), - ] { + for change in [json!({"resizeHeight": 32}), json!({"resize": {"height": 32, "lockAspect": true}})] { let mut s = Session::default(); s.execute("comp.new", json!({"name":"Square","width":64,"height":64,"frameRate":10,"duration":1})).unwrap(); s.execute("renderQueue.add", json!({})).unwrap(); diff --git a/crates/engine/src/tests.rs b/crates/engine/src/tests.rs index 3a21c1c6..f2cb1923 100644 --- a/crates/engine/src/tests.rs +++ b/crates/engine/src/tests.rs @@ -553,10 +553,7 @@ fn new_text_rejects_malformed_positions_without_creating_a_layer() { assert!(s.active_comp().unwrap().layers.is_empty()); } s.execute("layer.newText", json!({"name": "Valid", "text": "Hello", "position": [10, 20]})).unwrap(); - assert_eq!( - s.active_comp().unwrap().layers[0].props.prop("transform/position").unwrap().value, - effectcraft_keyframe::Value::Vec3([10.0, 20.0, 0.0]) - ); + assert_eq!(s.active_comp().unwrap().layers[0].props.prop("transform/position").unwrap().value, effectcraft_keyframe::Value::Vec3([10.0, 20.0, 0.0])); s.execute("layer.newText", json!({"text": "No explicit position"})).unwrap(); assert_eq!(s.active_comp().unwrap().layers.len(), 2); } diff --git a/crates/expr/src/tests.rs b/crates/expr/src/tests.rs index dc1a17be..3d5acb2d 100644 --- a/crates/expr/src/tests.rs +++ b/crates/expr/src/tests.rs @@ -1164,32 +1164,11 @@ fn thousands_of_host_reads_on_one_thread_keep_working() { #[test] fn pending_text_style_baseline_setters_are_visible_to_expression_getters() { let x = fx(); - assert_eq!( - x.num("thisComp.layer('Title').text.sourceText.style.setSuperscript(true).isSuperscript ? 1 : 0", 0.0), - 1.0 - ); - assert_eq!( - x.num("thisComp.layer('Title').text.sourceText.style.setSubscript(true).isSubscript ? 1 : 0", 0.0), - 1.0 - ); - assert_eq!( - x.num("thisComp.layer('Title').text.sourceText.style.setSuperscript(true).setSubscript(true).isSuperscript ? 1 : 0", 0.0), - 0.0 - ); - assert_eq!( - x.num("thisComp.layer('Title').text.sourceText.style.setSuperscript(true).setSubscript(true).isSubscript ? 1 : 0", 0.0), - 1.0 - ); - assert_eq!( - x.num("thisComp.layer('Title').text.sourceText.style.setSubscript(true).setSubscript(false).isSubscript ? 1 : 0", 0.0), - 0.0 - ); - assert_eq!( - x.num("thisComp.layer('Title').text.sourceText.style.setBaselineOption('superscript').isSuperscript ? 1 : 0", 0.0), - 1.0 - ); - assert_eq!( - x.text("var s = text.sourceText.style.setSuperscript(true); s.setText(s.isSuperscript ? 'super' : 'normal')", 0.0), - "super" - ); + assert_eq!(x.num("thisComp.layer('Title').text.sourceText.style.setSuperscript(true).isSuperscript ? 1 : 0", 0.0), 1.0); + assert_eq!(x.num("thisComp.layer('Title').text.sourceText.style.setSubscript(true).isSubscript ? 1 : 0", 0.0), 1.0); + assert_eq!(x.num("thisComp.layer('Title').text.sourceText.style.setSuperscript(true).setSubscript(true).isSuperscript ? 1 : 0", 0.0), 0.0); + assert_eq!(x.num("thisComp.layer('Title').text.sourceText.style.setSuperscript(true).setSubscript(true).isSubscript ? 1 : 0", 0.0), 1.0); + assert_eq!(x.num("thisComp.layer('Title').text.sourceText.style.setSubscript(true).setSubscript(false).isSubscript ? 1 : 0", 0.0), 0.0); + assert_eq!(x.num("thisComp.layer('Title').text.sourceText.style.setBaselineOption('superscript').isSuperscript ? 1 : 0", 0.0), 1.0); + assert_eq!(x.text("var s = text.sourceText.style.setSuperscript(true); s.setText(s.isSuperscript ? 'super' : 'normal')", 0.0), "super"); }