♻️ Rename smart pointers components for clarity
This commit is contained in:
parent
9a5618ef4b
commit
d80a594cf5
18 changed files with 151 additions and 155 deletions
|
|
@ -12,7 +12,7 @@ pub struct Item {
|
|||
item_size : flex::ItemSize,
|
||||
item_offset : flex::ItemOffset,
|
||||
item_align : flex::ItemAlign,
|
||||
stuff : AnyComponents,
|
||||
stuff : MixedComponents,
|
||||
}
|
||||
|
||||
impl ComponentTrait for Item {
|
||||
|
|
@ -115,12 +115,12 @@ impl Item {
|
|||
|
||||
#[rustfmt::skip]
|
||||
pub fn add_component(mut self, component: impl ComponentTrait) -> Self {
|
||||
self.stuff.alter_value(ArcAnyOp::Add(ArcAnyComponent::new(component)));
|
||||
self.stuff.alter_value(OneOp::Add(OneComponent::with(component)));
|
||||
self
|
||||
}
|
||||
|
||||
#[fn_builder]
|
||||
pub fn alter_components(&mut self, op: ArcAnyOp) -> &mut Self {
|
||||
pub fn alter_components(&mut self, op: OneOp) -> &mut Self {
|
||||
self.stuff.alter_value(op);
|
||||
self
|
||||
}
|
||||
|
|
@ -147,7 +147,7 @@ impl Item {
|
|||
&self.item_align
|
||||
}
|
||||
|
||||
pub fn components(&self) -> &AnyComponents {
|
||||
pub fn components(&self) -> &MixedComponents {
|
||||
&self.stuff
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue