🧑‍💻 Simplify component vector handling

This commit is contained in:
Manuel Cillero 2024-03-16 21:41:04 +01:00
parent 400a492311
commit d7acf0c3d1
17 changed files with 154 additions and 221 deletions

View file

@ -139,14 +139,14 @@ impl Item {
}
#[fn_builder]
pub fn alter_components(&mut self, op: MixedOp) -> &mut Self {
pub fn alter_components(&mut self, op: AnyOp) -> &mut Self {
self.mixed.alter_value(op);
self
}
#[rustfmt::skip]
pub fn add_component(mut self, component: impl ComponentTrait) -> Self {
self.mixed.alter_value(MixedOp::Add(AnyComponent::with(component)));
self.mixed.alter_value(AnyOp::Add(AnyComponent::with(component)));
self
}