mirror of
https://github.com/lennart-k/rustical.git
synced 2026-01-30 15:18:22 +00:00
Some small fixes on recurrence expansion
This commit is contained in:
@@ -5,14 +5,14 @@ use quick_xml::events::BytesStart;
|
||||
use crate::{XmlDeserialize, XmlError};
|
||||
|
||||
// TODO: actually implement
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub struct Unparsed(BytesStart<'static>);
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct Unparsed(String);
|
||||
|
||||
impl Unparsed {
|
||||
#[must_use]
|
||||
pub fn tag_name(&self) -> String {
|
||||
// TODO: respect namespace?
|
||||
String::from_utf8_lossy(self.0.local_name().as_ref()).to_string()
|
||||
self.0.clone()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ impl XmlDeserialize for Unparsed {
|
||||
let mut buf = vec![];
|
||||
reader.read_to_end_into(start.name(), &mut buf)?;
|
||||
}
|
||||
Ok(Self(start.to_owned()))
|
||||
let tag_name = String::from_utf8_lossy(start.local_name().as_ref()).to_string();
|
||||
Ok(Self(tag_name))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user