🚚 Rename alter_...(...) functions to set_...(...)

This commit is contained in:
Manuel Cillero 2024-07-27 14:17:45 +02:00
parent dfb34d2e36
commit fea6c2f69e
42 changed files with 314 additions and 312 deletions

View file

@ -31,20 +31,20 @@ impl Megamenu {
// Megamenu BUILDER.
#[fn_builder]
pub fn alter_id(&mut self, id: impl Into<String>) -> &mut Self {
self.id.alter_value(id);
pub fn set_id(&mut self, id: impl Into<String>) -> &mut Self {
self.id.set_value(id);
self
}
#[fn_builder]
pub fn alter_groups(&mut self, op: TypedOp<Group>) -> &mut Self {
self.groups.alter_typed(op);
pub fn set_groups(&mut self, op: TypedOp<Group>) -> &mut Self {
self.groups.set_typed(op);
self
}
#[rustfmt::skip]
pub fn add_group(mut self, group: Group) -> Self {
self.groups.alter_value(AnyOp::Add(AnyComponent::with(group)));
self.groups.set_value(AnyOp::Add(AnyComponent::with(group)));
self
}