Box, box
This commit is contained in:
parent
dd55f8c623
commit
61b5fb1aa7
1 changed files with 3 additions and 3 deletions
|
@ -74,7 +74,7 @@ struct CriFlags {
|
|||
|
||||
#[derive(Debug, Clone)]
|
||||
enum Message {
|
||||
IrcMessageReceived(irc::proto::Message),
|
||||
IrcMessageReceived(Box<irc::proto::Message>),
|
||||
InputChanged(String),
|
||||
InputSubmitted,
|
||||
}
|
||||
|
@ -103,7 +103,7 @@ impl Application for Cri {
|
|||
|
||||
fn update(&mut self, message: Self::Message) -> iced::Command<Self::Message> {
|
||||
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)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue