diff options
| author | winstxnhdw <winstxnhdw@gmail.com> | 2024-07-09 22:29:22 +0100 |
|---|---|---|
| committer | winstxnhdw <winstxnhdw@gmail.com> | 2024-07-09 22:30:00 +0100 |
| commit | 15f08032bfd91fe260ecaa3cd2506d4a0263dc1a (patch) | |
| tree | 84b83f46fcaabaf09989b840e913accfd384eca8 | |
| parent | 36c344ee973ab579c60ce0f61e612ef5be356450 (diff) | |
| download | rust-15f08032bfd91fe260ecaa3cd2506d4a0263dc1a.tar.gz rust-15f08032bfd91fe260ecaa3cd2506d4a0263dc1a.zip | |
style: prefer type inference
- unrelated to the PR but I wanted to change this in #17467
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs b/src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs index 36ad608468e..0534a7139e4 100644 --- a/src/tools/rust-analyzer/crates/ide-assists/src/handlers/bool_to_enum.rs +++ b/src/tools/rust-analyzer/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)?; |
