(config: Option<Vec<(String, String)>>)
| 39 | // Implement `TrinityCommand`, and get an implementation of `Guest` for free! |
| 40 | impl<T: TrinityCommand> module::messaging::Guest for T { |
| 41 | fn init(config: Option<Vec<(String, String)>>) { |
| 42 | // Convert the Vec of tuples to a HashMap for convenience. |
| 43 | let config = match config { |
| 44 | Some(cfg) => cfg |
| 45 | .iter() |
| 46 | .map(|(k, v)| (k.to_string(), v.to_string())) |
| 47 | .collect(), |
| 48 | None => HashMap::new(), |
| 49 | }; |
| 50 | |
| 51 | Self::init(config); |
| 52 | } |
| 53 | |
| 54 | fn help(topic: Option<String>) -> String { |
| 55 | Self::on_help(topic.as_deref()) |
nothing calls this directly
no outgoing calls
no test coverage detected