From dfb5ade023d736278510d5dbe6265a18183f20af Mon Sep 17 00:00:00 2001 From: Joscha Date: Thu, 3 Mar 2022 00:34:54 +0100 Subject: [PATCH] Use external event sender --- cove-tui/src/cove/conn.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cove-tui/src/cove/conn.rs b/cove-tui/src/cove/conn.rs index 170b622..7dd3195 100644 --- a/cove-tui/src/cove/conn.rs +++ b/cove-tui/src/cove/conn.rs @@ -383,8 +383,8 @@ pub async fn new( url: String, room: String, timeout: Duration, -) -> (Arc>, CoveConnMt, UnboundedReceiver) { - let (ev_tx, ev_rx) = mpsc::unbounded_channel(); + ev_tx: UnboundedSender, +) -> (Arc>, CoveConnMt) { let conn = Arc::new(Mutex::new(CoveConn { state: State::Connecting, ev_tx: ev_tx.clone(), @@ -396,5 +396,5 @@ pub async fn new( conn, ev_tx, }; - (mt.conn.clone(), mt, ev_rx) + (mt.conn.clone(), mt) }