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

@ -92,7 +92,7 @@ impl<S: 'static> Panel<S> {
self
}
fn render(mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Component<S> {
fn render(self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Component<S> {
let theme = theme(cx);
let current_size = self.width.unwrap_or(self.initial_width);
@ -113,7 +113,7 @@ impl<S: 'static> Panel<S> {
})
.bg(theme.surface)
.border_color(theme.border)
.children(self.children.drain(..))
.children(self.children)
}
}