check for child decks case-insensitively

This commit is contained in:
Damien Elmes 2020-03-21 07:57:07 +10:00
parent c3314d3689
commit ad09c89c3c

View file

@ -13,10 +13,12 @@ pub struct Deck {
}
pub(crate) fn child_ids<'a>(decks: &'a [Deck], name: &str) -> impl Iterator<Item = ObjID> + 'a {
let prefix = format!("{}::", name);
let prefix = format!("{}::", name.to_ascii_lowercase());
decks
.iter()
.filter(move |d| d.name.starts_with(&prefix))
.filter(move |d| {
d.name.to_ascii_lowercase().starts_with(&prefix)
})
.map(|d| d.id)
}