mirror of
https://github.com/ratatui/ratatui.git
synced 2025-10-01 06:51:53 +00:00
style(examples): rustfmt
This commit is contained in:
parent
f6d2f8f929
commit
37aa06f508
@ -11,7 +11,7 @@ use std::io;
|
|||||||
|
|
||||||
use termion::event::Key;
|
use termion::event::Key;
|
||||||
use termion::input::MouseTerminal;
|
use termion::input::MouseTerminal;
|
||||||
use termion::raw::{IntoRawMode};
|
use termion::raw::IntoRawMode;
|
||||||
use termion::screen::AlternateScreen;
|
use termion::screen::AlternateScreen;
|
||||||
use tui::backend::{Backend, TermionBackend};
|
use tui::backend::{Backend, TermionBackend};
|
||||||
use tui::layout::{Constraint, Direction, Layout, Rect};
|
use tui::layout::{Constraint, Direction, Layout, Rect};
|
||||||
|
@ -19,17 +19,17 @@ mod util;
|
|||||||
|
|
||||||
use std::io::{self, Write};
|
use std::io::{self, Write};
|
||||||
|
|
||||||
use unicode_width::UnicodeWidthStr;
|
use termion::cursor::Goto;
|
||||||
use termion::event::Key;
|
use termion::event::Key;
|
||||||
use termion::input::MouseTerminal;
|
use termion::input::MouseTerminal;
|
||||||
use termion::raw::IntoRawMode;
|
use termion::raw::IntoRawMode;
|
||||||
use termion::screen::AlternateScreen;
|
use termion::screen::AlternateScreen;
|
||||||
use termion::cursor::Goto;
|
|
||||||
use tui::backend::TermionBackend;
|
use tui::backend::TermionBackend;
|
||||||
use tui::layout::{Constraint, Direction, Layout, Rect};
|
use tui::layout::{Constraint, Direction, Layout, Rect};
|
||||||
use tui::style::{Color, Style};
|
use tui::style::{Color, Style};
|
||||||
use tui::widgets::{Block, Borders, List, Paragraph, Text, Widget};
|
use tui::widgets::{Block, Borders, List, Paragraph, Text, Widget};
|
||||||
use tui::Terminal;
|
use tui::Terminal;
|
||||||
|
use unicode_width::UnicodeWidthStr;
|
||||||
|
|
||||||
use util::event::{Event, Events};
|
use util::event::{Event, Events};
|
||||||
|
|
||||||
@ -97,7 +97,11 @@ fn main() -> Result<(), failure::Error> {
|
|||||||
})?;
|
})?;
|
||||||
|
|
||||||
// Put the cursor back inside the input box
|
// 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
|
// Handle input
|
||||||
match events.next()? {
|
match events.next()? {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user