mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04: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 {
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue