Commit 3b21022ee7

3b21022ee794b58acbef81f20c3950d145626df0

parent: 0db137a142

Unsigned

Damir Jelić <poljar@termina.org.uk> · 2020-01-12 17:16 UTC

server: Remove an unused thread message type.

Layout: unified · split

src/server.rs +1 −3
@@ -43,7 +43,6 @@ pub enum ServerError {
4343}
4444
4545pub enum ServerMessage {
46 ShutDown,
4746 RoomSend(String, String),
4847}
4948
@@ -222,7 +221,7 @@ impl Drop for MatrixServer {
222221 let option_name = &format!("{}.{}", self.name(), option_name);
223222 section
224223 .free_option(option_name)
225 .expect(&format!("Can't free option {}", option_name));
224 .unwrap_or_else(|_| panic!(format!("Can't free option {}", option_name)));
226225 }
227226 }
228227}
@@ -496,7 +495,6 @@ impl MatrixServer {
496495 ) {
497496 while let Some(message) = channel.recv().await {
498497 match message {
499 ServerMessage::ShutDown => return,
500498 ServerMessage::RoomSend(room_id, message) => {
501499 let content =
502500 MessageEventContent::Text(TextMessageEventContent {