radicle-term: Pass in `mut self` rather than rebinding
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
parent
19c484e956
commit
55cdd880bf
|
|
@ -72,15 +72,13 @@ impl<'a> VStack<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Add multiple elements to the stack.
|
/// Add multiple elements to the stack.
|
||||||
pub fn children<I>(self, children: I) -> Self
|
pub fn children<I>(mut self, children: I) -> Self
|
||||||
where
|
where
|
||||||
I: IntoIterator<Item = Box<dyn Element>>,
|
I: IntoIterator<Item = Box<dyn Element>>,
|
||||||
{
|
{
|
||||||
let mut vstack = self;
|
self.rows
|
||||||
vstack
|
|
||||||
.rows
|
|
||||||
.extend(children.into_iter().map(|e| Row::Element(Box::new(e))));
|
.extend(children.into_iter().map(|e| Row::Element(Box::new(e))));
|
||||||
vstack
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Merge with another `VStack`.
|
/// Merge with another `VStack`.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue