jingle_ibb, ibb, rsm: Simplify attribute parsing.

This commit is contained in:
Emmanuel Gil Peyrot 2017-05-21 16:08:25 +01:00
commit a4f50f2d43
4 changed files with 26 additions and 27 deletions

View file

@ -61,7 +61,7 @@ impl<'a> TryFrom<&'a Element> for Set {
if set.first.is_some() {
return Err(Error::ParseError("Set cant have more than one first."));
}
set.first_index = get_attr!(child, "index", optional, index, index.parse()?);
set.first_index = get_attr!(child, "index", optional);
set.first = Some(child.text());
} else if child.is("index", ns::RSM) {
if set.index.is_some() {