diff options
Diffstat (limited to 'teleterm-web/src/model.rs')
-rw-r--r-- | teleterm-web/src/model.rs | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/teleterm-web/src/model.rs b/teleterm-web/src/model.rs index 0e6f82d..fb36902 100644 --- a/teleterm-web/src/model.rs +++ b/teleterm-web/src/model.rs @@ -4,7 +4,6 @@ const LIST_URL: &str = "http://127.0.0.1:4145/list"; const WATCH_URL: &str = "ws://127.0.0.1:4145/watch"; struct WatchConn { - id: String, #[allow(dead_code)] // no idea why it thinks this is dead ws: WebSocket, } @@ -35,13 +34,11 @@ impl Model { ) { let ws = crate::ws::connect( &format!("{}?id={}", WATCH_URL, id), + id, crate::Msg::Watch, orders, ); - self.watch_conn = Some(WatchConn { - id: id.to_string(), - ws, - }) + self.watch_conn = Some(WatchConn { ws }) } pub fn sessions(&self) -> &[Session] { @@ -52,14 +49,6 @@ impl Model { self.sessions = sessions; } - pub fn watch_id(&self) -> Option<&str> { - if let Some(conn) = &self.watch_conn { - Some(&conn.id) - } else { - None - } - } - pub fn watch_disconnect(&mut self) { self.watch_conn = None; } |