diff --git a/src/ui/widgets.rs b/src/ui/widgets.rs index bdb0809..63c9092 100644 --- a/src/ui/widgets.rs +++ b/src/ui/widgets.rs @@ -7,5 +7,5 @@ use toss::frame::{Frame, Pos, Size}; pub trait Widget { fn size(&self, frame: &mut Frame, max_width: Option, max_height: Option) -> Size; - async fn render(&self, frame: &mut Frame, pos: Pos, size: Size); + async fn render(self, frame: &mut Frame, pos: Pos, size: Size); } diff --git a/src/ui/widgets/text.rs b/src/ui/widgets/text.rs index 267f447..d7ee938 100644 --- a/src/ui/widgets/text.rs +++ b/src/ui/widgets/text.rs @@ -47,7 +47,7 @@ impl Widget for Text { Size::new(min_width as u16, min_height as u16) } - async fn render(&self, frame: &mut Frame, pos: Pos, size: Size) { + async fn render(self, frame: &mut Frame, pos: Pos, size: Size) { for (i, line) in self .wrapped(frame, Some(size.width)) .into_iter()