diff --git a/instant-xml/src/lib.rs b/instant-xml/src/lib.rs index d4d689e..7c393f4 100644 --- a/instant-xml/src/lib.rs +++ b/instant-xml/src/lib.rs @@ -238,7 +238,7 @@ impl<'xml> Deserializer<'xml> { } } - pub fn peek_next_tag(&mut self) -> Result, Error> { + pub fn peek_next_tag(&mut self) -> Result>, Error> { self.parser.peek_next_tag() } diff --git a/instant-xml/src/parse.rs b/instant-xml/src/parse.rs index 87a47f2..53d030b 100644 --- a/instant-xml/src/parse.rs +++ b/instant-xml/src/parse.rs @@ -19,7 +19,7 @@ impl<'a> XmlParser<'a> { } } - pub fn peek_next_tag(&mut self) -> Result, Error> { + pub fn peek_next_tag(&mut self) -> Result>, Error> { let item = match self.iter.peek() { Some(v) => v, None => return Ok(None), @@ -33,7 +33,7 @@ impl<'a> XmlParser<'a> { }; Ok(Some(XmlRecord::Open(TagData { - key: local, + key: local.as_str(), attributes: Vec::new(), default_namespace: Some(""), namespaces: HashMap::new(),