aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/assists/add_new.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-25 14:51:17 +0000
committerGitHub <[email protected]>2019-11-25 14:51:17 +0000
commitecd1204804a2a3c8b9b98e4b9d18feef06ab51c7 (patch)
treed051e9bb71631cca33a1b4c23bf3f2576d1c0f56 /crates/ra_assists/src/assists/add_new.rs
parentbe00d74c7b61fb82bdade482e95035a21f9dd736 (diff)
parent1455663ea15ecbfbe87b4b5be6919aa35dd0b260 (diff)
Merge #2403
2403: Fixme for union fields r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_assists/src/assists/add_new.rs')
-rw-r--r--crates/ra_assists/src/assists/add_new.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/assists/add_new.rs b/crates/ra_assists/src/assists/add_new.rs
index ee8bff346..8f68bd5fb 100644
--- a/crates/ra_assists/src/assists/add_new.rs
+++ b/crates/ra_assists/src/assists/add_new.rs
@@ -35,8 +35,8 @@ pub(crate) fn add_new(ctx: AssistCtx<impl HirDatabase>) -> Option<Assist> {
35 let strukt = ctx.find_node_at_offset::<ast::StructDef>()?; 35 let strukt = ctx.find_node_at_offset::<ast::StructDef>()?;
36 36
37 // We want to only apply this to non-union structs with named fields 37 // We want to only apply this to non-union structs with named fields
38 let field_list = match (strukt.kind(), strukt.is_union()) { 38 let field_list = match strukt.kind() {
39 (StructKind::Record(named), false) => named, 39 StructKind::Record(named) => named,
40 _ => return None, 40 _ => return None,
41 }; 41 };
42 42