Make it case-insensitive

This commit is contained in:
Alex Auvolat 2021-03-15 19:16:42 +01:00
parent 5ee1d956b6
commit 642bed601f

View file

@ -108,7 +108,8 @@ impl TableSchema for KeyTable {
match filter { match filter {
KeyFilter::Deleted(df) => df.apply(entry.deleted.get()), KeyFilter::Deleted(df) => df.apply(entry.deleted.get()),
KeyFilter::Matches(pat) => { KeyFilter::Matches(pat) => {
entry.key_id.starts_with(pat) || entry.name.get().to_lowercase() == pat.to_lowercase() let pat = pat.to_lowercase();
entry.key_id.to_lowercase().starts_with(&pat) || entry.name.get().to_lowercase() == pat
} }
} }
} }