This commit is contained in:
Ayaz Hafiz 2022-07-22 18:16:57 -04:00
parent 59ab1da83f
commit 838ba14581
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58

View file

@ -1410,7 +1410,7 @@ fn canonicalize_when_branch<'a>(
}
}
if some_symbols_not_bound_in_all_patterns && pattern_bound_symbols_body_needs.len() > 0 {
if some_symbols_not_bound_in_all_patterns && !pattern_bound_symbols_body_needs.is_empty() {
// There might be branches that don't bind all the symbols needed by the body; mark those
// branches degenerate.
for pattern in patterns.iter_mut() {