From 76202a2c7371a6930db7b83af75c0f5a8ae1d061 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 29 Jul 2020 19:22:15 +0200 Subject: Rename NomialDef -> AdtDef --- crates/ra_assists/src/handlers/generate_derive.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists/src/handlers/generate_derive.rs') diff --git a/crates/ra_assists/src/handlers/generate_derive.rs b/crates/ra_assists/src/handlers/generate_derive.rs index 6ccf39900..90ece9fab 100644 --- a/crates/ra_assists/src/handlers/generate_derive.rs +++ b/crates/ra_assists/src/handlers/generate_derive.rs @@ -26,7 +26,7 @@ use crate::{AssistContext, AssistId, AssistKind, Assists}; // ``` pub(crate) fn generate_derive(acc: &mut Assists, ctx: &AssistContext) -> Option<()> { let cap = ctx.config.snippet_cap?; - let nominal = ctx.find_node_at_offset::()?; + let nominal = ctx.find_node_at_offset::()?; let node_start = derive_insertion_offset(&nominal)?; let target = nominal.syntax().text_range(); acc.add( @@ -58,7 +58,7 @@ pub(crate) fn generate_derive(acc: &mut Assists, ctx: &AssistContext) -> Option< } // Insert `derive` after doc comments. -fn derive_insertion_offset(nominal: &ast::NominalDef) -> Option { +fn derive_insertion_offset(nominal: &ast::AdtDef) -> Option { let non_ws_child = nominal .syntax() .children_with_tokens() -- cgit v1.2.3