Skip to content

Commit 386d438

Browse files
committed
skip_while_next
1 parent 355c944 commit 386d438

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ new_without_default = "allow"
179179
non_canonical_clone_impl = "allow"
180180
non_canonical_partial_ord_impl = "allow"
181181
self_named_constructors = "allow"
182-
skip_while_next = "allow"
183182
too_many_arguments = "allow"
184183
toplevel_ref_arg = "allow"
185184
type_complexity = "allow"

crates/ide-completion/src/context/analysis.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,8 +1267,7 @@ fn pattern_context_for(
12671267
pat
12681268
.syntax()
12691269
.ancestors()
1270-
.skip_while(|it| ast::Pat::can_cast(it.kind()))
1271-
.next()
1270+
.find(|it| !ast::Pat::can_cast(it.kind()))
12721271
.map_or((PatternRefutability::Irrefutable, false), |node| {
12731272
let refutability = match_ast! {
12741273
match node {

0 commit comments

Comments
 (0)