Skip to content

Commit 4a0821f

Browse files
weiraneVeykril
andcommitted
Simplify const reference check
Co-authored-by: Lukas Wirth <[email protected]>
1 parent 8d7a393 commit 4a0821f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/ide-assists/src/handlers/convert_let_else_to_match.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ fn binders_in_pat(
1717
let ident = p.name()?;
1818
let ismut = p.ref_token().is_none() && p.mut_token().is_some();
1919
// check for const reference
20-
if !(p.is_simple_ident() && sem.resolve_bind_pat_to_const(p).is_some()) {
20+
if sem.resolve_bind_pat_to_const(p).is_none() {
2121
acc.push((ident, ismut));
2222
}
2323
if let Some(inner) = p.pat() {

0 commit comments

Comments
 (0)