ui2: Clean up drain
s
This commit is contained in:
parent
d62c51a4b8
commit
7b4a895ab9
8 changed files with 21 additions and 25 deletions
|
@ -22,7 +22,7 @@ impl ChatPanel {
|
|||
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> {
|
||||
div()
|
||||
.id(self.element_id.clone())
|
||||
.flex()
|
||||
|
@ -60,7 +60,7 @@ impl ChatPanel {
|
|||
.flex_col()
|
||||
.gap_3()
|
||||
.overflow_y_scroll()
|
||||
.children(self.messages.drain(..)),
|
||||
.children(self.messages),
|
||||
)
|
||||
// Composer
|
||||
.child(div().flex().my_2().child(Input::new("Message #design"))),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue