ui2: Clean up drain
s
This commit is contained in:
parent
d62c51a4b8
commit
7b4a895ab9
8 changed files with 21 additions and 25 deletions
|
@ -42,7 +42,7 @@ impl Palette {
|
|||
self
|
||||
}
|
||||
|
||||
fn render<S: 'static>(mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Component<S> {
|
||||
fn render<S: 'static>(self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Component<S> {
|
||||
let theme = theme(cx);
|
||||
|
||||
v_stack()
|
||||
|
@ -81,7 +81,7 @@ impl Palette {
|
|||
.into_iter()
|
||||
.flatten(),
|
||||
)
|
||||
.children(self.items.drain(..).enumerate().map(|(index, item)| {
|
||||
.children(self.items.into_iter().enumerate().map(|(index, item)| {
|
||||
h_stack()
|
||||
.id(index)
|
||||
.justify_between()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue