Skip to content

Commit 15f0803

Browse files
committed
style: prefer type inference
- unrelated to the PR but I wanted to change this in #17467
1 parent 36c344e commit 15f0803

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ struct BoolNodeData {
9696

9797
/// Attempts to find an appropriate node to apply the action to.
9898
fn find_bool_node(ctx: &AssistContext<'_>) -> Option<BoolNodeData> {
99-
let name: ast::Name = ctx.find_node_at_offset()?;
99+
let name = ctx.find_node_at_offset::<ast::Name>()?;
100100

101101
if let Some(ident_pat) = name.syntax().parent().and_then(ast::IdentPat::cast) {
102102
let def = ctx.sema.to_def(&ident_pat)?;

0 commit comments

Comments
 (0)