forked from janek/mostr
feat(task): match state filter case-insensitively
This commit is contained in:
parent
5d6b2a2dcb
commit
b71916c905
|
@ -164,8 +164,11 @@ impl TaskState {
|
||||||
}
|
}
|
||||||
pub(crate) fn matches_label(&self, label: &str) -> bool {
|
pub(crate) fn matches_label(&self, label: &str) -> bool {
|
||||||
self.state == State::Active
|
self.state == State::Active
|
||||||
|| self.name.as_ref().is_some_and(|n| n == label)
|
|| self
|
||||||
|| self.state.to_string() == label
|
.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 {
|
impl fmt::Display for TaskState {
|
||||||
|
|
Loading…
Reference in New Issue