mirror of
https://github.com/ankitects/anki.git
synced 2025-12-10 21:36:55 -05:00
check for child decks case-insensitively
This commit is contained in:
parent
c3314d3689
commit
ad09c89c3c
1 changed files with 4 additions and 2 deletions
|
|
@ -13,10 +13,12 @@ pub struct Deck {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn child_ids<'a>(decks: &'a [Deck], name: &str) -> impl Iterator<Item = ObjID> + 'a {
|
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
|
decks
|
||||||
.iter()
|
.iter()
|
||||||
.filter(move |d| d.name.starts_with(&prefix))
|
.filter(move |d| {
|
||||||
|
d.name.to_ascii_lowercase().starts_with(&prefix)
|
||||||
|
})
|
||||||
.map(|d| d.id)
|
.map(|d| d.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue