Skip to content

Commit a4f934e

Browse files
matkladVeetaha
andauthored
Update crates/rust-analyzer/src/handlers.rs
Co-authored-by: Veetaha <[email protected]>
1 parent 3c1714d commit a4f934e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

crates/rust-analyzer/src/handlers.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,9 +413,7 @@ pub(crate) fn handle_runnables(
413413
Some(offset) => {
414414
let source_file = snap.analysis.parse(file_id)?;
415415
algo::find_node_at_offset::<ast::MacroCall>(source_file.syntax(), offset)
416-
.and_then(|it| it.path())
417-
.and_then(|it| it.segment())
418-
.and_then(|it| it.name_ref())
416+
.and_then(|it| it.path()?.segment()?.name_ref())
419417
.map_or(false, |it| it.text() == "expect")
420418
}
421419
None => false,

0 commit comments

Comments
 (0)