mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
Simplify check_self macro.
This commit is contained in:
parent
5cdb2d77ab
commit
6eba0e7d87
1 changed files with 1 additions and 3 deletions
|
@ -127,9 +127,7 @@ macro_rules! generate_attribute {
|
|||
|
||||
macro_rules! check_self {
|
||||
($elem:ident, $name:tt, $ns:expr) => (
|
||||
if !$elem.is($name, $ns) {
|
||||
return Err(Error::ParseError(concat!("This is not a ", $name, " element.")));
|
||||
}
|
||||
check_self!($elem, $name, $ns, $name);
|
||||
);
|
||||
($elem:ident, $name:tt, $ns:expr, $pretty_name:tt) => (
|
||||
if !$elem.is($name, $ns) {
|
||||
|
|
Loading…
Reference in a new issue