We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36c344e commit 15f0803Copy full SHA for 15f0803
src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs
@@ -96,7 +96,7 @@ struct BoolNodeData {
96
97
/// Attempts to find an appropriate node to apply the action to.
98
fn find_bool_node(ctx: &AssistContext<'_>) -> Option<BoolNodeData> {
99
- let name: ast::Name = ctx.find_node_at_offset()?;
+ let name = ctx.find_node_at_offset::<ast::Name>()?;
100
101
if let Some(ident_pat) = name.syntax().parent().and_then(ast::IdentPat::cast) {
102
let def = ctx.sema.to_def(&ident_pat)?;
0 commit comments