🚚 Rename Arc...Op::AddFirst to Prepend
This commit is contained in:
parent
04286f1875
commit
942ecad778
2 changed files with 4 additions and 4 deletions
|
|
@ -55,7 +55,7 @@ pub enum ArcAnyOp {
|
||||||
Add(ArcAnyComponent),
|
Add(ArcAnyComponent),
|
||||||
AddAfterId(&'static str, ArcAnyComponent),
|
AddAfterId(&'static str, ArcAnyComponent),
|
||||||
AddBeforeId(&'static str, ArcAnyComponent),
|
AddBeforeId(&'static str, ArcAnyComponent),
|
||||||
AddFirst(ArcAnyComponent),
|
Prepend(ArcAnyComponent),
|
||||||
RemoveById(&'static str),
|
RemoveById(&'static str),
|
||||||
ReplaceById(&'static str, ArcAnyComponent),
|
ReplaceById(&'static str, ArcAnyComponent),
|
||||||
Reset,
|
Reset,
|
||||||
|
|
@ -91,7 +91,7 @@ impl AnyComponents {
|
||||||
Some(index) => self.0.insert(index, arc),
|
Some(index) => self.0.insert(index, arc),
|
||||||
_ => self.0.insert(0, arc),
|
_ => self.0.insert(0, arc),
|
||||||
},
|
},
|
||||||
ArcAnyOp::AddFirst(arc) => self.0.insert(0, arc),
|
ArcAnyOp::Prepend(arc) => self.0.insert(0, arc),
|
||||||
ArcAnyOp::RemoveById(id) => {
|
ArcAnyOp::RemoveById(id) => {
|
||||||
if let Some(index) = self.0.iter().position(|c| c.id() == id) {
|
if let Some(index) = self.0.iter().position(|c| c.id() == id) {
|
||||||
self.0.remove(index);
|
self.0.remove(index);
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ pub enum ArcTypedOp<C: ComponentTrait> {
|
||||||
Add(ArcTypedComponent<C>),
|
Add(ArcTypedComponent<C>),
|
||||||
AddAfterId(&'static str, ArcTypedComponent<C>),
|
AddAfterId(&'static str, ArcTypedComponent<C>),
|
||||||
AddBeforeId(&'static str, ArcTypedComponent<C>),
|
AddBeforeId(&'static str, ArcTypedComponent<C>),
|
||||||
AddFirst(ArcTypedComponent<C>),
|
Prepend(ArcTypedComponent<C>),
|
||||||
RemoveById(&'static str),
|
RemoveById(&'static str),
|
||||||
ReplaceById(&'static str, ArcTypedComponent<C>),
|
ReplaceById(&'static str, ArcTypedComponent<C>),
|
||||||
Reset,
|
Reset,
|
||||||
|
|
@ -88,7 +88,7 @@ impl<C: ComponentTrait + Default> TypedComponents<C> {
|
||||||
Some(index) => self.0.insert(index, one),
|
Some(index) => self.0.insert(index, one),
|
||||||
_ => self.0.insert(0, one),
|
_ => self.0.insert(0, one),
|
||||||
},
|
},
|
||||||
ArcTypedOp::AddFirst(one) => self.0.insert(0, one),
|
ArcTypedOp::Prepend(one) => self.0.insert(0, one),
|
||||||
ArcTypedOp::RemoveById(id) => {
|
ArcTypedOp::RemoveById(id) => {
|
||||||
if let Some(index) = self.0.iter().position(|c| c.id() == id) {
|
if let Some(index) = self.0.iter().position(|c| c.id() == id) {
|
||||||
self.0.remove(index);
|
self.0.remove(index);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue