mirror of
https://github.com/ratatui-org/ratatui
synced 2025-02-16 22:18:51 +00:00
style(examples): rustfmt
This commit is contained in:
parent
f6d2f8f929
commit
37aa06f508
2 changed files with 8 additions and 4 deletions
|
@ -11,7 +11,7 @@ use std::io;
|
|||
|
||||
use termion::event::Key;
|
||||
use termion::input::MouseTerminal;
|
||||
use termion::raw::{IntoRawMode};
|
||||
use termion::raw::IntoRawMode;
|
||||
use termion::screen::AlternateScreen;
|
||||
use tui::backend::{Backend, TermionBackend};
|
||||
use tui::layout::{Constraint, Direction, Layout, Rect};
|
||||
|
|
|
@ -19,17 +19,17 @@ mod util;
|
|||
|
||||
use std::io::{self, Write};
|
||||
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
use termion::cursor::Goto;
|
||||
use termion::event::Key;
|
||||
use termion::input::MouseTerminal;
|
||||
use termion::raw::IntoRawMode;
|
||||
use termion::screen::AlternateScreen;
|
||||
use termion::cursor::Goto;
|
||||
use tui::backend::TermionBackend;
|
||||
use tui::layout::{Constraint, Direction, Layout, Rect};
|
||||
use tui::style::{Color, Style};
|
||||
use tui::widgets::{Block, Borders, List, Paragraph, Text, Widget};
|
||||
use tui::Terminal;
|
||||
use unicode_width::UnicodeWidthStr;
|
||||
|
||||
use util::event::{Event, Events};
|
||||
|
||||
|
@ -97,7 +97,11 @@ fn main() -> Result<(), failure::Error> {
|
|||
})?;
|
||||
|
||||
// Put the cursor back inside the input box
|
||||
write!(terminal.backend_mut(), "{}", Goto(4 + app.input.width() as u16, 4))?;
|
||||
write!(
|
||||
terminal.backend_mut(),
|
||||
"{}",
|
||||
Goto(4 + app.input.width() as u16, 4)
|
||||
)?;
|
||||
|
||||
// Handle input
|
||||
match events.next()? {
|
||||
|
|
Loading…
Add table
Reference in a new issue