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