From 75ae6100b4dbf7f59f4f54acc6c645139bcd4ac1 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 29 Jul 2017 02:41:42 +0100 Subject: [PATCH] data_forms: Remove unneccessary swallowing of an error. --- src/data_forms.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/data_forms.rs b/src/data_forms.rs index eb751e0..a2330a5 100644 --- a/src/data_forms.rs +++ b/src/data_forms.rs @@ -186,10 +186,8 @@ impl TryFrom 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.")); }