Skip to content

Commit 30300a3

Browse files
author
cht
committed
cargo fmt
1 parent c42d691 commit 30300a3

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn run_app<B: Backend>(terminal: &mut Terminal<B>, mut app: App) -> io::Resu
1111
loop {
1212
// here ,need with different tab ,use different draw funcitons
1313
//terminal.draw(|f| render::ui(f, &mut app))?;
14-
if let IFEXIT::Exit = render::run_app_subscribe(terminal,&mut app)? {
14+
if let IFEXIT::Exit = render::run_app_subscribe(terminal, &mut app)? {
1515
return Ok(());
1616
}
1717
}

src/subscribe/render.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
use super::app::*;
2+
use super::IFEXIT;
3+
use std::io;
24
use tui::{
3-
Terminal,
45
backend::Backend,
56
layout::{Constraint, Direction, Layout, Rect},
67
style::{Color, Modifier, Style},
78
text::{Span, Spans, Text},
89
widgets::{Block, Borders, Clear, List, ListItem, Paragraph},
9-
Frame,
10+
Frame, Terminal,
1011
};
1112
use unicode_width::UnicodeWidthStr;
12-
use super::IFEXIT;
13-
use std::io;
14-
pub fn run_app_subscribe<B: Backend>(terminal: &mut Terminal<B>,app: &mut App) -> io::Result<IFEXIT> {
15-
terminal.draw(|f| ui(f,app))?;
13+
pub fn run_app_subscribe<B: Backend>(
14+
terminal: &mut Terminal<B>,
15+
app: &mut App,
16+
) -> io::Result<IFEXIT> {
17+
terminal.draw(|f| ui(f, app))?;
1618
super::state::subscribe_state(app)
1719
}
1820
fn ui<B: Backend>(f: &mut Frame<B>, app: &mut App) {

0 commit comments

Comments
 (0)