From 048aae2e6e720891c36c5edc32666c453182f423 Mon Sep 17 00:00:00 2001 From: Dmitry Stepanov Date: Fri, 12 Jun 2026 22:35:45 +0300 Subject: [PATCH] removed `ReflectInheriableVariable::clone_value_box` - replaced with `Reflect::try_clone_box` --- fyrox-core/src/reflect/inherit.rs | 3 --- fyrox-core/src/variable.rs | 5 ----- fyrox-graph/src/lib.rs | 2 +- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/fyrox-core/src/reflect/inherit.rs b/fyrox-core/src/reflect/inherit.rs index 08e33fa22..9a7b4f69c 100644 --- a/fyrox-core/src/reflect/inherit.rs +++ b/fyrox-core/src/reflect/inherit.rs @@ -42,9 +42,6 @@ pub trait ReflectInheritableVariable: Reflect { /// Returns true if value was modified. fn is_modified(&self) -> bool; - /// Clones self value. - fn clone_value_box(&self) -> Box; - /// Marks value as modified, so its value won't be overwritten during property inheritance. fn mark_modified(&mut self); diff --git a/fyrox-core/src/variable.rs b/fyrox-core/src/variable.rs index 5905a12f3..a4bc70eb3 100644 --- a/fyrox-core/src/variable.rs +++ b/fyrox-core/src/variable.rs @@ -561,11 +561,6 @@ where self.is_modified() } - #[inline] - fn clone_value_box(&self) -> Box { - Box::new(self.value.clone()) - } - #[inline] fn mark_modified(&mut self) { self.mark_modified() diff --git a/fyrox-graph/src/lib.rs b/fyrox-graph/src/lib.rs index bdb72113b..0a683ce2a 100644 --- a/fyrox-graph/src/lib.rs +++ b/fyrox-graph/src/lib.rs @@ -555,7 +555,7 @@ pub trait NodeWrapper: Reflect + NameProvider + Clone { .resolve_path(path, &mut |result| match result { Ok(parent_field) => { if let Some(parent_inheritable) = parent_field.as_inheritable_variable() { - parent_value = Some(parent_inheritable.clone_value_box()); + parent_value = parent_inheritable.inner_value_ref().try_clone_box(); } } Err(e) => Log::err(format!(