diff options
author | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-05 17:58:59 +0530 |
---|---|---|
committer | Sebastian Thiel <sthiel@thoughtworks.com> | 2019-06-05 17:58:59 +0530 |
commit | ae679ed0daed2f2faf1bd8b4db922bdf450f738a (patch) | |
tree | 92da1a1f2ab1dbb01abc283b7661b6cb4a8a74f5 /tui-react | |
parent | 3aa9b0168425706b6bdfa4eb2b9335da24bc15fd (diff) |
Entries is now ReactEntries :)
Diffstat (limited to 'tui-react')
-rw-r--r-- | tui-react/src/block.rs | 7 | ||||
-rw-r--r-- | tui-react/src/list.rs | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/tui-react/src/block.rs b/tui-react/src/block.rs index ee6fece..9225f84 100644 --- a/tui-react/src/block.rs +++ b/tui-react/src/block.rs @@ -1,5 +1,4 @@ //! Derived from TUI-rs, license: MIT, Copyright (c) 2016 Florian Dehau -use super::ToplevelComponent; use std::borrow::Borrow; use std::marker::PhantomData; use tui::{ @@ -71,10 +70,8 @@ impl<'a> BlockProps<'a> { } } -impl<'a, T> ToplevelComponent for Block<'a, T> { - type Props = BlockProps<'a>; - - fn render(&mut self, props: impl Borrow<Self::Props>, area: Rect, buf: &mut Buffer) { +impl<'a, T> Block<'a, T> { + fn render(&self, props: impl Borrow<BlockProps<'a>>, area: Rect, buf: &mut Buffer) { if area.width < 2 || area.height < 2 { return; } diff --git a/tui-react/src/list.rs b/tui-react/src/list.rs index 5975a85..05984e1 100644 --- a/tui-react/src/list.rs +++ b/tui-react/src/list.rs @@ -17,7 +17,7 @@ pub fn fill_background_to_right(mut s: String, entire_width: u16) -> String { } } -#[derive(Default)] // TODO: remove Clone derive +#[derive(Default, Clone)] // TODO: remove Clone derive pub struct ReactList { /// The index at which the list last started. Used for scrolling offset: usize, |