diff --git a/bin/map/src/app.rs b/bin/map/src/app.rs index c79797d7c..5070fc98b 100644 --- a/bin/map/src/app.rs +++ b/bin/map/src/app.rs @@ -1,5 +1,5 @@ use crate::{ - list::NodeIdList, + list::IdPanel, node_info::{NodeInfo, NodeInfoView}, }; //use smol::Timer; @@ -10,7 +10,7 @@ use crate::{ // arc reference #[derive(Clone)] pub struct App { - pub node_list: NodeIdList, + pub node_list: IdPanel, pub node_info: NodeInfoView, } @@ -59,13 +59,13 @@ impl App { infos[4].id.clone(), ]; - let node_list = NodeIdList::new(ids); + let node_list = IdPanel::new(ids); //let infos = Vec::new(); //let ids = Vec::new(); //let node_info = NodeInfoView::new(infos); - //let node_list = NodeIdList::new(ids); + //let node_list = IdPanel::new(ids); App { node_list, node_info } } diff --git a/bin/map/src/list.rs b/bin/map/src/list.rs index 44ab29321..8cd42dceb 100644 --- a/bin/map/src/list.rs +++ b/bin/map/src/list.rs @@ -2,14 +2,14 @@ use tui::widgets::ListState; #[derive(Clone)] -pub struct NodeIdList { +pub struct IdPanel { pub state: ListState, pub node_id: Vec, } -impl NodeIdList { - pub fn new(node_id: Vec) -> NodeIdList { - NodeIdList { state: ListState::default(), node_id } +impl IdPanel { + pub fn new(node_id: Vec) -> IdPanel { + IdPanel { state: ListState::default(), node_id } } pub fn next(&mut self) { diff --git a/bin/map/src/main.rs b/bin/map/src/main.rs index 5667ea014..e93faf4da 100644 --- a/bin/map/src/main.rs +++ b/bin/map/src/main.rs @@ -78,11 +78,7 @@ async fn main() -> Result<()> { terminal.clear()?; - // let current_state = get_current_state.await; - // let mut app = app.lock(); - // app.current_state = current_state; let app = Arc::new(Mutex::new(App::new())); - //let app = App::new(); let nthreads = num_cpus::get(); let (signal, shutdown) = async_channel::unbounded::<()>();