Skip to content

Commit e7e80c6

Browse files
author
cht
committed
move inputmod to mods
1 parent 42e1b92 commit e7e80c6

4 files changed

Lines changed: 11 additions & 11 deletions

File tree

src/app.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
use crate::state::IFEXIT;
22
use std::io;
33
use tui::{backend::Backend, Terminal};
4-
pub enum InputMode {
5-
Normal,
6-
Editing,
7-
Select,
8-
Popup,
9-
PopupEdit,
10-
SubscriptView,
11-
}
4+
125
pub trait App {
136
fn run_app_local<B: Backend>(&mut self, terminal: &mut Terminal<B>) -> io::Result<IFEXIT>;
147
}

src/subscribe/appsub.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ use crate::state::IFEXIT;
66
use std::io;
77
use tui::widgets::ListState;
88
use tui::{backend::Backend, Terminal};
9+
pub enum InputMode {
10+
Normal,
11+
Editing,
12+
Select,
13+
Popup,
14+
PopupEdit,
15+
SubscriptView,
16+
}
917
/// App holds the state of the application
1018
pub struct AppSub {
1119
/// Current value of the input box

src/subscribe/render.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use super::app::InputMode;
1+
use super::appsub::InputMode;
22
use super::appsub::AppSub;
33
use tui::{
44
backend::Backend,

src/subscribe/state.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
use super::app::InputMode;
2-
use super::appsub::AppSub;
1+
use super::appsub::*;
32
use super::spider;
43
use super::utils;
54
use super::{Page, IFEXIT};

0 commit comments

Comments
 (0)