data_forms: Remove unneccessary swallowing of an error.

This commit is contained in:
Emmanuel Gil Peyrot 2017-07-29 02:41:42 +01:00
parent 4b3ced042e
commit 75ae6100b4

View file

@ -186,10 +186,8 @@ impl TryFrom<Element> for DataForm {
value: value, value: value,
}); });
} else if element.is("media", ns::MEDIA_ELEMENT) { } else if element.is("media", ns::MEDIA_ELEMENT) {
match MediaElement::try_from(element.clone()) { let media_element = MediaElement::try_from(element.clone())?;
Ok(media_element) => field.media.push(media_element), field.media.push(media_element);
Err(_) => (), // TODO: is it really nice to swallow this error?
}
} else { } else {
return Err(Error::ParseError("Field child isnt a value or media element.")); return Err(Error::ParseError("Field child isnt a value or media element."));
} }