mirror of
https://github.com/lennart-k/rustical.git
synced 2025-12-14 01:12:24 +00:00
xml: Implement proper NamespaceOwned type
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use rustical_xml::NamespaceOwned;
|
||||
use rustical_xml::XmlDeserialize;
|
||||
use rustical_xml::XmlRootTag;
|
||||
|
||||
@@ -14,7 +15,7 @@ pub struct PropElement<PN: XmlDeserialize = Propname>(#[xml(ty = "untagged", fla
|
||||
#[derive(Debug, Clone, XmlDeserialize, PartialEq)]
|
||||
pub struct Propname {
|
||||
#[xml(ty = "namespace")]
|
||||
pub ns: Option<String>,
|
||||
pub ns: Option<NamespaceOwned>,
|
||||
#[xml(ty = "tag_name")]
|
||||
pub name: String,
|
||||
}
|
||||
|
||||
@@ -56,11 +56,11 @@ fn propfind_prop() {
|
||||
prop: PropfindType::Prop(PropElement(vec![
|
||||
Propname {
|
||||
name: "displayname".to_owned(),
|
||||
ns: Some("DAV:".to_owned())
|
||||
ns: Some("DAV:".to_owned().into())
|
||||
},
|
||||
Propname {
|
||||
name: "color".to_owned(),
|
||||
ns: Some("DAV:".to_owned())
|
||||
ns: Some("DAV:".to_owned().into())
|
||||
},
|
||||
]))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user