From d8caf56dfc9eb3cdddff05b58b954a78cf1b9476 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 22 Nov 2019 21:52:06 +0300 Subject: Uniformalize naming --- crates/ra_assists/src/assists/add_new.rs | 2 +- crates/ra_assists/src/assists/fill_match_arms.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists/src') diff --git a/crates/ra_assists/src/assists/add_new.rs b/crates/ra_assists/src/assists/add_new.rs index b5f8afb4e..ee8bff346 100644 --- a/crates/ra_assists/src/assists/add_new.rs +++ b/crates/ra_assists/src/assists/add_new.rs @@ -36,7 +36,7 @@ pub(crate) fn add_new(ctx: AssistCtx) -> Option { // We want to only apply this to non-union structs with named fields let field_list = match (strukt.kind(), strukt.is_union()) { - (StructKind::Named(named), false) => named, + (StructKind::Record(named), false) => named, _ => return None, }; diff --git a/crates/ra_assists/src/assists/fill_match_arms.rs b/crates/ra_assists/src/assists/fill_match_arms.rs index 9354466d9..8482897c5 100644 --- a/crates/ra_assists/src/assists/fill_match_arms.rs +++ b/crates/ra_assists/src/assists/fill_match_arms.rs @@ -101,7 +101,7 @@ fn build_pat(var: ast::EnumVariant) -> Option { iter::repeat(make::placeholder_pat().into()).take(field_list.fields().count()); make::tuple_struct_pat(path, pats).into() } - ast::StructKind::Named(field_list) => { + ast::StructKind::Record(field_list) => { let pats = field_list.fields().map(|f| make::bind_pat(f.name().unwrap()).into()); make::record_pat(path, pats).into() } -- cgit v1.2.3