aboutsummaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-15 19:16:42 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-15 19:16:42 +0100
commit642bed601f9b5f8a0cf3e99223235e6b3eb33c0a (patch)
tree0143de19af2ea5c5bed883f7ce2c0748ee5544a0 /src/model
parent5ee1d956b6c7dd847a304ef524253b2e067e1245 (diff)
downloadgarage-642bed601f9b5f8a0cf3e99223235e6b3eb33c0a.tar.gz
garage-642bed601f9b5f8a0cf3e99223235e6b3eb33c0a.zip
Make it case-insensitive
Diffstat (limited to 'src/model')
-rw-r--r--src/model/key_table.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/model/key_table.rs b/src/model/key_table.rs
index ce5888ce..88d7b4ff 100644
--- a/src/model/key_table.rs
+++ b/src/model/key_table.rs
@@ -108,7 +108,8 @@ impl TableSchema for KeyTable {
match filter {
KeyFilter::Deleted(df) => df.apply(entry.deleted.get()),
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
}
}
}