removed impls for field/field_mut

- these are redundant now, since auto-generated method does the same
This commit is contained in:
Dmitry Stepanov
2025-03-15 09:40:27 +03:00
parent ad0bbc6ed8
commit 3edc428aac
3 changed files with 0 additions and 68 deletions
-34
View File
@@ -206,26 +206,6 @@ macro_rules! define_two_args_node {
let this = std::mem::replace(self, value.take()?);
Ok(Box::new(this))
}
fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>)) {
func(match name {
"Lhs" => Some(&self.lhs),
"Rhs" => Some(&self.rhs),
_ => None,
})
}
fn field_mut(
&mut self,
name: &str,
func: &mut dyn FnMut(Option<&mut dyn Reflect>),
) {
func(match name {
"Lhs" => Some(&mut self.lhs),
"Rhs" => Some(&mut self.rhs),
_ => None,
})
}
}
};
}
@@ -367,20 +347,6 @@ impl<T: EntityId> Reflect for NotNode<T> {
let this = std::mem::replace(self, value.take()?);
Ok(Box::new(this))
}
fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>)) {
func(match name {
"Lhs" => Some(&self.lhs),
_ => None,
})
}
fn field_mut(&mut self, name: &str, func: &mut dyn FnMut(Option<&mut dyn Reflect>)) {
func(match name {
"Lhs" => Some(&mut self.lhs),
_ => None,
})
}
}
/// A node responsible for logical operations evaluation. It can have any number of descendant nodes.
-16
View File
@@ -202,22 +202,6 @@ impl<T: Reflect> Reflect for Handle<T> {
Ok(Box::new(this))
}
fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>)) {
func(match name {
"Index" => Some(&self.index),
"Generation" => Some(&self.generation),
_ => None,
})
}
fn field_mut(&mut self, name: &str, func: &mut dyn FnMut(Option<&mut dyn Reflect>)) {
func(match name {
"Index" => Some(&mut self.index),
"Generation" => Some(&mut self.generation),
_ => None,
})
}
fn as_handle(&self, func: &mut dyn FnMut(Option<&dyn ReflectHandle>)) {
func(Some(self))
}
-18
View File
@@ -243,24 +243,6 @@ impl Reflect for Limb {
let this = std::mem::replace(self, value.take()?);
Ok(Box::new(this))
}
fn field(&self, name: &str, func: &mut dyn FnMut(Option<&dyn Reflect>)) {
func(match name {
"Bone" => Some(&self.bone),
"PhysicalBone" => Some(&self.physical_bone),
"Children" => Some(&self.children),
_ => None,
})
}
fn field_mut(&mut self, name: &str, func: &mut dyn FnMut(Option<&mut dyn Reflect>)) {
func(match name {
"Bone" => Some(&mut self.bone),
"PhysicalBone" => Some(&mut self.physical_bone),
"Children" => Some(&mut self.children),
_ => None,
})
}
}
impl Visit for Limb {