mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
macros: Simplify generated code for check_no_attributes!().
This commit is contained in:
parent
6bb466eea2
commit
84355f9e1d
1 changed files with 3 additions and 1 deletions
|
@ -206,7 +206,9 @@ macro_rules! check_no_children {
|
||||||
|
|
||||||
macro_rules! check_no_attributes {
|
macro_rules! check_no_attributes {
|
||||||
($elem:ident, $name:tt) => (
|
($elem:ident, $name:tt) => (
|
||||||
check_no_unknown_attributes!($elem, $name, []);
|
for _ in $elem.attrs() {
|
||||||
|
return Err(Error::ParseError(concat!("Unknown attribute in ", $name, " element.")));
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue