Skip to content

Commit ee3afce

Browse files
committed
simplify
1 parent f95e41b commit ee3afce

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/generate/register.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,7 @@ pub fn fields(
605605
ev = (*index.evs.get(epath).unwrap()).clone();
606606
}
607607
} else if let Some(path) = fdpath.as_ref() {
608-
epath = Some(
609-
path.new_enum(
610-
ev.name
611-
.clone()
612-
.unwrap_or_else(|| index.fields.get(path).unwrap().name.clone()),
613-
),
614-
);
608+
epath = Some(path.new_enum(ev.name.clone().unwrap_or_else(|| path.name.clone())));
615609
}
616610
lookup_results.push((ev, epath));
617611
}

0 commit comments

Comments
 (0)