From 14cd65692eae182fccc0cd5b3ae1553807296803 Mon Sep 17 00:00:00 2001 From: SteamSmith <341182916+SteamSmith@users.noreply.github.com> Date: Sat, 28 Nov 2026 21:11:06 -0500 Subject: [PATCH] fix: same_document ignores crate-private Document fields (main added painted_regions) Co-Authored-By: Claude Sonnet 5.5 --- crates/engine/tests/session.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/engine/tests/session.rs b/crates/engine/tests/session.rs index e06b4fbb..de808261 100644 --- a/crates/engine/tests/session.rs +++ b/crates/engine/tests/session.rs @@ -19,9 +19,10 @@ fn session_at(texture_size: u32) -> Session { } /// Whether two documents hold the same content (`Document` has no `PartialEq`). Destructured so -/// a new field must be compared here too. +/// a new public field must be compared here too (crate-private fields, such as `painted_regions`, +/// can't be reached from an integration test). fn same_document(a: &Document, b: &Document) -> bool { - let Document { project, pixels: PixelStore { layers, masks }, baked, bake_paint, resources, bake_meshes } = a; + let Document { project, pixels: PixelStore { layers, masks }, baked, bake_paint, resources, bake_meshes, .. } = a; // Bake meshes have no equality (each holds a mesh and its BVH): the same high polys and cage // stand in for them. let same_meshes = bake_meshes.high.len() == b.bake_meshes.high.len() && bake_meshes.cage.is_some() == b.bake_meshes.cage.is_some();