mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 07:02:24 +00:00
rustical_xml: Use darling for proc-macro parsing
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user