Avoid elided lifetimes to refer to XML lifetime

This commit is contained in:
Dirkjan Ochtman 2022-09-01 10:39:04 +02:00
parent c6a6e707a4
commit edc1fbd64c
2 changed files with 3 additions and 3 deletions

View File

@ -238,7 +238,7 @@ impl<'xml> Deserializer<'xml> {
} }
} }
pub fn peek_next_tag(&mut self) -> Result<Option<XmlRecord>, Error> { pub fn peek_next_tag(&mut self) -> Result<Option<XmlRecord<'xml>>, Error> {
self.parser.peek_next_tag() self.parser.peek_next_tag()
} }

View File

@ -19,7 +19,7 @@ impl<'a> XmlParser<'a> {
} }
} }
pub fn peek_next_tag(&mut self) -> Result<Option<XmlRecord>, Error> { pub fn peek_next_tag(&mut self) -> Result<Option<XmlRecord<'a>>, Error> {
let item = match self.iter.peek() { let item = match self.iter.peek() {
Some(v) => v, Some(v) => v,
None => return Ok(None), None => return Ok(None),
@ -33,7 +33,7 @@ impl<'a> XmlParser<'a> {
}; };
Ok(Some(XmlRecord::Open(TagData { Ok(Some(XmlRecord::Open(TagData {
key: local, key: local.as_str(),
attributes: Vec::new(), attributes: Vec::new(),
default_namespace: Some(""), default_namespace: Some(""),
namespaces: HashMap::new(), namespaces: HashMap::new(),