Unnamed repository; edit this file 'description' to name the repository.
style: prefer type inference
- unrelated to the PR but I wanted to change this in #17467
winstxnhdw 2024-07-10
parent 2b52bff · commit 120526a
-rw-r--r--crates/ide-assists/src/handlers/bool_to_enum.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide-assists/src/handlers/bool_to_enum.rs b/crates/ide-assists/src/handlers/bool_to_enum.rs
index 36ad608468..0534a7139e 100644
--- a/crates/ide-assists/src/handlers/bool_to_enum.rs
+++ b/crates/ide-assists/src/handlers/bool_to_enum.rs
@@ -96,7 +96,7 @@ struct BoolNodeData {
/// Attempts to find an appropriate node to apply the action to.
fn find_bool_node(ctx: &AssistContext<'_>) -> Option<BoolNodeData> {
- let name: ast::Name = ctx.find_node_at_offset()?;
+ let name = ctx.find_node_at_offset::<ast::Name>()?;
if let Some(ident_pat) = name.syntax().parent().and_then(ast::IdentPat::cast) {
let def = ctx.sema.to_def(&ident_pat)?;