mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Uniformalize naming
This commit is contained in:
parent
4d49b5d174
commit
d8caf56dfc
6 changed files with 17 additions and 22 deletions
|
@ -178,15 +178,15 @@ impl ast::ImplBlock {
|
|||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum StructKind {
|
||||
Record(ast::RecordFieldDefList),
|
||||
Tuple(ast::TupleFieldDefList),
|
||||
Named(ast::RecordFieldDefList),
|
||||
Unit,
|
||||
}
|
||||
|
||||
impl StructKind {
|
||||
fn from_node<N: AstNode>(node: &N) -> StructKind {
|
||||
if let Some(nfdl) = child_opt::<_, ast::RecordFieldDefList>(node) {
|
||||
StructKind::Named(nfdl)
|
||||
StructKind::Record(nfdl)
|
||||
} else if let Some(pfl) = child_opt::<_, ast::TupleFieldDefList>(node) {
|
||||
StructKind::Tuple(pfl)
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue