♻️ Rename smart pointers components for clarity

This commit is contained in:
Manuel Cillero 2024-03-04 22:21:40 +01:00
parent 9a5618ef4b
commit d80a594cf5
18 changed files with 151 additions and 155 deletions

View file

@ -8,7 +8,7 @@ pub struct Megamenu {
id : OptionId,
weight : Weight,
renderable: Renderable,
groups : TypedComponents<Group>,
groups : VectorComponents<Group>,
}
impl ComponentTrait for Megamenu {
@ -60,19 +60,19 @@ impl Megamenu {
#[rustfmt::skip]
pub fn add_group(mut self, group: Group) -> Self {
self.groups.alter_value(ArcTypedOp::Add(ArcTypedComponent::new(group)));
self.groups.alter_value(TypedOp::Add(TypedComponent::with(group)));
self
}
#[fn_builder]
pub fn alter_groups(&mut self, op: ArcTypedOp<Group>) -> &mut Self {
pub fn alter_groups(&mut self, op: TypedOp<Group>) -> &mut Self {
self.groups.alter_value(op);
self
}
// Megamenu GETTERS.
pub fn groups(&self) -> &TypedComponents<Group> {
pub fn groups(&self) -> &VectorComponents<Group> {
&self.groups
}
}