forked from janek/mostr
1
0
Fork 0

feat(task): match state filter case-insensitively

This commit is contained in:
xeruf 2024-07-29 09:43:01 +03:00
parent 5d6b2a2dcb
commit b71916c905
1 changed files with 5 additions and 2 deletions

View File

@ -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 {