mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-12 16:12:44 +02:00
fix(wm): remove panic on missing matching strategy
This commit ensures that if an IdWithIdentifer without an explicitly set matching strategy makes it through to should_act_individual, it will be treated the same as MatchingStrategy::Legacy instead of causing a runtime panic.
This commit is contained in:
@@ -777,10 +777,7 @@ pub fn should_act_individual(
|
|||||||
let mut should_act = false;
|
let mut should_act = false;
|
||||||
|
|
||||||
match identifier.matching_strategy {
|
match identifier.matching_strategy {
|
||||||
None => {
|
None | Some(MatchingStrategy::Legacy) => match identifier.kind {
|
||||||
panic!("there is no matching strategy identified for this rule");
|
|
||||||
}
|
|
||||||
Some(MatchingStrategy::Legacy) => match identifier.kind {
|
|
||||||
ApplicationIdentifier::Title => {
|
ApplicationIdentifier::Title => {
|
||||||
if title.starts_with(&identifier.id) || title.ends_with(&identifier.id) {
|
if title.starts_with(&identifier.id) || title.ends_with(&identifier.id) {
|
||||||
should_act = true;
|
should_act = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user