|
1 | 1 | use eyre::{Context, Report}; |
| 2 | +use tokio::sync::mpsc; |
2 | 3 | use tuirealm::{ |
3 | 4 | Application, Update, |
4 | | - ratatui::layout::{Constraint, Direction, Layout}, |
5 | | - ratatui::widgets::Clear, |
| 5 | + ratatui::{ |
| 6 | + layout::{Constraint, Direction, Layout}, |
| 7 | + widgets::Clear, |
| 8 | + }, |
6 | 9 | terminal::{TerminalAdapter, TerminalBridge}, |
7 | 10 | }; |
8 | 11 |
|
9 | 12 | use crate::{ |
10 | 13 | app::{ |
11 | 14 | ids::Id, |
12 | | - messages::{ |
13 | | - CscsMsg, ErrorPopupMsg, InfoPopupMsg, JobMsg, LoginPopupMsg, MenuMsg, Msg, |
14 | | - SystemSelectMsg, |
15 | | - }, |
| 15 | + messages::{CscsMsg, ErrorPopupMsg, InfoPopupMsg, JobMsg, LoginPopupMsg, MenuMsg, Msg, SystemSelectMsg}, |
16 | 16 | user_events::UserEvent, |
17 | 17 | }, |
18 | 18 | components::{ |
19 | 19 | error_popup::ErrorPopup, info_popup::InfoPopup, login_popup::LoginPopup, |
20 | | - system_select_popup::SystemSelectPopup, workload_list::WorkloadList, |
21 | | - workload_log::WorkloadLog, workload_menu::WorkloadMenu, |
| 20 | + system_select_popup::SystemSelectPopup, workload_list::WorkloadList, workload_log::WorkloadLog, |
| 21 | + workload_menu::WorkloadMenu, |
22 | 22 | }, |
23 | | - cscs::{cli::cscs_login, handlers::cscs_system_set}, |
| 23 | + cscs::handlers::{cscs_login, cscs_system_set}, |
24 | 24 | trace_dbg, |
25 | 25 | util::ui::draw_area_in_absolute, |
26 | 26 | }; |
27 | | -use tokio::sync::mpsc; |
28 | 27 |
|
29 | 28 | pub struct Model<T> |
30 | 29 | where |
@@ -145,11 +144,7 @@ where |
145 | 144 | SystemSelectMsg::Opened(systems) => { |
146 | 145 | assert!( |
147 | 146 | self.app |
148 | | - .mount( |
149 | | - Id::SystemSelectPopup, |
150 | | - Box::new(SystemSelectPopup::new(systems)), |
151 | | - vec![] |
152 | | - ) |
| 147 | + .mount(Id::SystemSelectPopup, Box::new(SystemSelectPopup::new(systems)), vec![]) |
153 | 148 | .is_ok() |
154 | 149 | ); |
155 | 150 | assert!(self.app.active(&Id::SystemSelectPopup).is_ok()); |
@@ -306,8 +301,7 @@ where |
306 | 301 | Err(e) => error_tx |
307 | 302 | .send(format!( |
308 | 303 | "{:?}", |
309 | | - Err::<(), Report>(e) |
310 | | - .wrap_err("Login failed with supplied credentials") |
| 304 | + Err::<(), Report>(e).wrap_err("Login failed with supplied credentials") |
311 | 305 | )) |
312 | 306 | .await |
313 | 307 | .unwrap(), |
|
0 commit comments