[examples] Clean user input example

This commit is contained in:
Florian Dehau 2018-01-27 10:34:45 +01:00
parent 299279dc2d
commit d53ecaeade

View file

@ -53,7 +53,6 @@ fn main() {
// Channels
let (tx, rx) = mpsc::channel();
let input_tx = tx.clone();
let clock_tx = tx.clone();
// Input
thread::spawn(move || {
@ -115,6 +114,7 @@ fn draw(t: &mut Terminal<MouseBackend>, app: &App) {
.sizes(&[Size::Fixed(3), Size::Min(1)])
.render(t, &app.size, |t, chunks| {
Paragraph::default()
.style(Style::default().fg(Color::Yellow))
.block(Block::default().borders(Borders::ALL).title("Input"))
.text(&app.input)
.render(t, &chunks[0]);