aboutsummaryrefslogtreecommitdiffstats
path: root/src/slack.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/slack.rs')
-rw-r--r--src/slack.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/slack.rs b/src/slack.rs
index 750f071..bb80ff1 100644
--- a/src/slack.rs
+++ b/src/slack.rs
@@ -57,13 +57,15 @@ impl slack::EventHandler for Handler {
.start_response()
.channels
.as_ref()
- .and_then(|channels| {
- Some(channels
- .iter()
- .map(|channel| format!("{}: {}",
- channel.name.as_ref().unwrap_or(&"??".to_string()), //TODO &"".to_string() ?
- channel.id.as_ref().unwrap_or(&"??".to_string()))) //TODO
- .collect::<Vec<_>>())
+ .map(|channels| {
+ channels
+ .iter()
+ .map(|channel| format!(
+ "{}: {}",
+ channel.name.as_deref().unwrap_or("??"),
+ channel.id.as_deref().unwrap_or("??"),
+ ))
+ .collect::<Vec<_>>()
}));
}
}