mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
data_forms: Remove unneccessary swallowing of an error.
This commit is contained in:
parent
4b3ced042e
commit
75ae6100b4
1 changed files with 2 additions and 4 deletions
|
@ -186,10 +186,8 @@ impl TryFrom<Element> for DataForm {
|
|||
value: value,
|
||||
});
|
||||
} else if element.is("media", ns::MEDIA_ELEMENT) {
|
||||
match MediaElement::try_from(element.clone()) {
|
||||
Ok(media_element) => field.media.push(media_element),
|
||||
Err(_) => (), // TODO: is it really nice to swallow this error?
|
||||
}
|
||||
let media_element = MediaElement::try_from(element.clone())?;
|
||||
field.media.push(media_element);
|
||||
} else {
|
||||
return Err(Error::ParseError("Field child isn’t a value or media element."));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue