xmpp-parsers: Remove two now-unused get_attr!() variants
OptionEmpty and RequiredNonEmpty were long gone. skip-changelog, because this is internal API only.
This commit is contained in:
parent
33c8f07a6e
commit
7953524eb7
1 changed files with 0 additions and 24 deletions
|
|
@ -14,13 +14,6 @@ macro_rules! get_attr {
|
|||
value.parse().map_err(xso::error::Error::text_parse_error)?
|
||||
)
|
||||
};
|
||||
($elem:ident, $attr:tt, OptionEmpty, $value:ident, $func:expr) => {
|
||||
match $elem.attr($attr) {
|
||||
Some("") => None,
|
||||
Some($value) => Some($func),
|
||||
None => None,
|
||||
}
|
||||
};
|
||||
($elem:ident, $attr:tt, Option, $value:ident, $func:expr) => {
|
||||
match $elem.attr($attr) {
|
||||
Some($value) => Some($func),
|
||||
|
|
@ -38,23 +31,6 @@ macro_rules! get_attr {
|
|||
}
|
||||
}
|
||||
};
|
||||
($elem:ident, $attr:tt, RequiredNonEmpty, $value:ident, $func:expr) => {
|
||||
match $elem.attr($attr) {
|
||||
Some("") => {
|
||||
return Err(xso::error::Error::Other(
|
||||
concat!("Required attribute '", $attr, "' must not be empty.").into(),
|
||||
)
|
||||
.into());
|
||||
}
|
||||
Some($value) => $func,
|
||||
None => {
|
||||
return Err(xso::error::Error::Other(
|
||||
concat!("Required attribute '", $attr, "' missing.").into(),
|
||||
)
|
||||
.into());
|
||||
}
|
||||
}
|
||||
};
|
||||
($elem:ident, $attr:tt, Default, $value:ident, $func:expr) => {
|
||||
match $elem.attr($attr) {
|
||||
Some($value) => $func,
|
||||
|
|
|
|||
Loading…
Reference in a new issue