ui2: Clean up drains

This commit is contained in:
Marshall Bowers 2023-10-26 15:41:29 +02:00
parent d62c51a4b8
commit 7b4a895ab9
8 changed files with 21 additions and 25 deletions

View file

@ -58,7 +58,7 @@ impl<S: 'static> Modal<S> {
.child(div().children(self.title.clone().map(|t| Label::new(t))))
.child(IconButton::new("close", Icon::Close)),
)
.child(v_stack().p_1().children(self.children.drain(..)))
.child(v_stack().p_1().children(self.children))
.when(
self.primary_action.is_some() || self.secondary_action.is_some(),
|this| {