xmpp-parsers: Remove two now-unused get_attr!() variants

Emmanuel Gil Peyrot created

OptionEmpty and RequiredNonEmpty were long gone.

skip-changelog, because this is internal API only.

Change summary

parsers/src/util/macros.rs | 24 ------------------------
1 file changed, 24 deletions(-)

Detailed changes

parsers/src/util/macros.rs 🔗

@@ -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,