This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
why does the for-loop consume `evts`: | |
fn next_start_elem<R: Read>(evts: &mut Events<R>) -> Result<String, Error> { | |
for evt in evts { | |
if let XmlEvent::StartElement{ name, .. } = try!(evt) { | |
return Ok(name.local_name); | |
} | |
} | |
let _ = evts.text_position(); | |
Err(Error::UnexpectedEof) |