summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorCanop <cano.petrole@gmail.com>2019-01-29 19:49:25 +0100
committerCanop <cano.petrole@gmail.com>2019-01-29 19:49:25 +0100
commit6f80fa3e4dc45328d821eb03c0c8bd58071fe2ff (patch)
treec85799736dcb801f34532b155fe3666629d904a1 /src/main.rs
parent89fe29ef75f9d4668337275866e1306fe6009e49 (diff)
terminal size management refactoring
mostly to make so that there's only one point where the size is read
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs
index e61c6fb..43f82ea 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -42,12 +42,10 @@ use std::str::FromStr;
use crate::app::App;
use crate::app_context::AppContext;
-use crate::browser_states::BrowserState;
use crate::commands::Command;
use crate::conf::Conf;
use crate::errors::ProgramError;
use crate::external::Launchable;
-use crate::task_sync::TaskLifetime;
use crate::tree_options::TreeOptions;
use crate::verbs::VerbStore;
@@ -186,15 +184,11 @@ fn run() -> Result<Option<Launchable>, ProgramError> {
None => Vec::new(),
};
- Ok(
- match BrowserState::new(path.clone(), tree_options, &TaskLifetime::unlimited()) {
- Some(bs) => {
- let mut app = App::new();
- app.push(Box::new(bs));
- app.run(&con, input_commands)?
- }
- _ => None, // should not happen, as the lifetime is "unlimited"
- },
+ App::new().run(
+ &con,
+ path,
+ tree_options,
+ input_commands,
)
}