removed redundant method

This commit is contained in:
Dmitry Stepanov
2026-06-14 20:01:55 +03:00
parent 6e258eb2b4
commit 982302e156
+2 -12
View File
@@ -151,11 +151,11 @@ impl PropertyAction {
pub fn from_field_action(field_action: &FieldAction) -> Self {
match field_action {
FieldAction::ObjectAction(ref value) => Self::Modify {
value: value.clone().into_box_reflect(),
value: value.clone().value,
},
FieldAction::CollectionAction(ref collection_changed) => match **collection_changed {
CollectionAction::Add(ref value) => Self::AddItem {
value: value.clone().into_box_reflect(),
value: value.clone().value,
},
CollectionAction::Remove(index) => Self::RemoveItem { index },
CollectionAction::ItemChanged {
@@ -243,8 +243,6 @@ impl PropertyAction {
/// Trait of values that can be edited by an Inspector through reflection.
pub trait Value: Reflect + Send {
fn clone_box(&self) -> Box<dyn Value>;
fn into_box_reflect(self: Box<Self>) -> Box<dyn Reflect>;
}
impl<T> Value for T
@@ -254,10 +252,6 @@ where
fn clone_box(&self) -> Box<dyn Value> {
Box::new(self.clone())
}
fn into_box_reflect(self: Box<Self>) -> Box<dyn Reflect> {
Box::new(*(self as Box<dyn Reflect>).downcast::<T>().unwrap())
}
}
/// An untyped value that is created by an editor and sent in a message
@@ -298,10 +292,6 @@ impl ObjectValue {
false
}
}
pub fn into_box_reflect(self) -> Box<dyn Reflect> {
self.value.into_box_reflect()
}
}
impl PartialEq for FieldAction {