diff --git a/src/irc_handler.rs b/src/irc_handler.rs index b4279ea..851ef8c 100644 --- a/src/irc_handler.rs +++ b/src/irc_handler.rs @@ -34,15 +34,16 @@ pub async fn message_loop( loop { select! { val = irc_stream.next() => { - if let Some(message) = val.transpose()? { + if let Some(Ok(message)) = val { println!("[Rx] {}", message.to_string().trim()); message_tx.send(message)?; } } val = input_rx.recv() => { - let message = val.unwrap(); - println!("[Tx] {}", message.to_string().trim()); - client.send(message)?; + if let Some(message) = val { + println!("[Tx] {}", message.to_string().trim()); + client.send(message)?; + } } } }