From 80b8331008a601b0d68124cf3ed0a0627bea6a8e Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 9 Feb 2026 23:12:13 -0600 Subject: [PATCH] Refactor property comparison in compute_property_patches - Replaced direct comparison of snapshot and instance property values with a call to variant_eq for improved type safety and correctness in patch computation. --- src/snapshot/patch_compute.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/snapshot/patch_compute.rs b/src/snapshot/patch_compute.rs index 025ea9dc..30b163f4 100644 --- a/src/snapshot/patch_compute.rs +++ b/src/snapshot/patch_compute.rs @@ -8,7 +8,7 @@ use rbx_dom_weak::{ ustr, HashMapExt as _, UstrMap, UstrSet, }; -use crate::{RojoRef, REF_PATH_ATTRIBUTE_PREFIX, REF_POINTER_ATTRIBUTE_PREFIX}; +use crate::{variant_eq::variant_eq, RojoRef, REF_PATH_ATTRIBUTE_PREFIX, REF_POINTER_ATTRIBUTE_PREFIX}; use super::{ patch::{PatchAdd, PatchSet, PatchUpdate}, @@ -127,7 +127,7 @@ fn compute_property_patches( match instance.properties().get(&name) { Some(instance_value) => { - if &snapshot_value != instance_value { + if !variant_eq(&snapshot_value, instance_value) { changed_properties.insert(name, Some(snapshot_value)); } }