Commit 3b21022ee7
Unsigned
Layout: unified · split
src/server.rs +1 −3
| @@ -43,7 +43,6 @@ pub enum ServerError { | |||
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | pub enum ServerMessage { | 45 | pub enum ServerMessage { |
| 46 | ShutDown, | ||
| 47 | RoomSend(String, String), | 46 | RoomSend(String, String), |
| 48 | } | 47 | } |
| 49 | 48 | ||
| @@ -222,7 +221,7 @@ impl Drop for MatrixServer { | |||
| 222 | let option_name = &format!("{}.{}", self.name(), option_name); | 221 | let option_name = &format!("{}.{}", self.name(), option_name); |
| 223 | section | 222 | section |
| 224 | .free_option(option_name) | 223 | .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))); |
| 226 | } | 225 | } |
| 227 | } | 226 | } |
| 228 | } | 227 | } |
| @@ -496,7 +495,6 @@ impl MatrixServer { | |||
| 496 | ) { | 495 | ) { |
| 497 | while let Some(message) = channel.recv().await { | 496 | while let Some(message) = channel.recv().await { |
| 498 | match message { | 497 | match message { |
| 499 | ServerMessage::ShutDown => return, | ||
| 500 | ServerMessage::RoomSend(room_id, message) => { | 498 | ServerMessage::RoomSend(room_id, message) => { |
| 501 | let content = | 499 | let content = |
| 502 | MessageEventContent::Text(TextMessageEventContent { | 500 | MessageEventContent::Text(TextMessageEventContent { |