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,
|
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 isn’t a value or media element."));
|
return Err(Error::ParseError("Field child isn’t a value or media element."));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue