diff --git a/src/main.rs b/src/main.rs index 0c2cd7e..5fa3fc8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,7 +74,7 @@ struct CriFlags { #[derive(Debug, Clone)] enum Message { - IrcMessageReceived(irc::proto::Message), + IrcMessageReceived(Box), InputChanged(String), InputSubmitted, } @@ -103,7 +103,7 @@ impl Application for Cri { fn update(&mut self, message: Self::Message) -> iced::Command { match message { - Message::IrcMessageReceived(message) => self.message_log.push(message), + Message::IrcMessageReceived(message) => self.message_log.push(*message), Message::InputChanged(text) => self.input_value = text, Message::InputSubmitted => { let command = @@ -125,7 +125,7 @@ impl Application for Cri { self.message_rx.take(), move |mut receiver| async move { let message = receiver.as_mut().unwrap().recv().await.unwrap(); - (Message::IrcMessageReceived(message), receiver) + (Message::IrcMessageReceived(Box::new(message)), receiver) }, ) }