smol bot
Diffstat (limited to 'src/bot/search.rs')
| -rw-r--r-- | src/bot/search.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bot/search.rs b/src/bot/search.rs index 28d6cd3..d7b4364 100644 --- a/src/bot/search.rs +++ b/src/bot/search.rs @@ -1,5 +1,5 @@ +use crate::emoji::named::*; use anyhow::Result; -use emoji::named::*; use mindus::data::DataRead; use mindus::{Schematic, Serializable}; use poise::serenity_prelude::*; @@ -130,8 +130,7 @@ pub fn files() -> impl Iterator<Item = (PathBuf, u64)> { super::SPECIAL .keys() .filter_map(|&ch| dir(ch).map(|x| (x, ch))) - .map(|(fs, channel)| fs.map(move |f| (f, channel))) - .flatten() + .flat_map(|(fs, channel)| fs.map(move |f| (f, channel))) } pub fn load(f: &Path) -> Schematic { |