Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
adstep committed Nov 28, 2023
1 parent b7cfb30 commit b0cf982
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions crates/ide/src/runnables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,15 @@ fn find_selected_test(
syntax: &SyntaxNode,
position: FilePosition,
) -> Option<Runnable> {
syntax
.token_at_offset(position.offset)
.next()
.and_then(|token| token.parent())
.and_then(|node| {
syntax.token_at_offset(position.offset).next().and_then(|token| token.parent()).and_then(
|node| {
node.ancestors().find_map(|ancestor| {
let fn_def = ast::Fn::cast(ancestor)?;
test_related_attribute(&fn_def)?;
as_test_runnable(sema, &fn_def)
})
})
},
)
}

// Feature: Related Tests
Expand Down

0 comments on commit b0cf982

Please sign in to comment.