Add a warning for keys after the first node which do nothing (#4978)
* add a warning for keys after the first node which do nothing * warnings on stable * better warnings on nightly
This commit is contained in:
1 parent
c58526a36b
commit
386153672e
5 files changed
+57
-5
No files matched your search
@@ -176,6 +176,14 @@ impl BodyNode {
|
||||
_ => panic!("Element name not available for this node"),
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn key(&self) -> Option<&AttributeValue> {
|
||||
match self {
|
||||
Self::Element(el) => el.key(),
|
||||
Self::Component(comp) => comp.get_key(),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in new issue
Block a user