rustical_xml: Use darling for proc-macro parsing

This commit is contained in:
Lennart
2024-11-27 17:47:55 +01:00
parent a9ef680c30
commit 57268f202d
11 changed files with 227 additions and 479 deletions

View File

@@ -4,6 +4,7 @@ use xml_derive::XmlDeserialize;
#[test]
fn test_struct_untagged_enum() {
#[derive(Debug, XmlDeserialize, PartialEq)]
#[xml(root = b"propfind")]
struct Propfind {
prop: Prop,
}
@@ -20,12 +21,6 @@ fn test_struct_untagged_enum() {
B,
}
impl XmlRoot for Propfind {
fn root_tag() -> &'static [u8] {
b"propfind"
}
}
let doc = Propfind::parse_str(
r#"
<propfind>