mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-03-25 10:51:39 +01: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;
|
||||
|
||||
match identifier.matching_strategy {
|
||||
None => {
|
||||
panic!("there is no matching strategy identified for this rule");
|
||||
}
|
||||
Some(MatchingStrategy::Legacy) => match identifier.kind {
|
||||
None | Some(MatchingStrategy::Legacy) => match identifier.kind {
|
||||
ApplicationIdentifier::Title => {
|
||||
if title.starts_with(&identifier.id) || title.ends_with(&identifier.id) {
|
||||
should_act = true;
|
||||
|
||||
Reference in New Issue
Block a user