From b71916c905e4ce4f17a9163f6c6d1d8eea938041 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Mon, 29 Jul 2024 09:43:01 +0300 Subject: [PATCH] feat(task): match state filter case-insensitively --- src/task.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/task.rs b/src/task.rs index 2a858cc..af6a3ef 100644 --- a/src/task.rs +++ b/src/task.rs @@ -164,8 +164,11 @@ impl TaskState { } pub(crate) fn matches_label(&self, label: &str) -> bool { self.state == State::Active - || self.name.as_ref().is_some_and(|n| n == label) - || self.state.to_string() == label + || self + .name + .as_ref() + .is_some_and(|n| n.eq_ignore_ascii_case(label)) + || self.state.to_string().eq_ignore_ascii_case(label) } } impl fmt::Display for TaskState {