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:
Evan Almloff authored and GitHub committed 2025-11-30 15:29:50 -05:00
1 parent c58526a36b
commit 386153672e
5 files changed
+57 -5

No files matched your search

+8
View File
@@ -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)]