diff --git a/examples/src/bin/appsink.rs b/examples/src/bin/appsink.rs index 6c9023283..0f734c537 100644 --- a/examples/src/bin/appsink.rs +++ b/examples/src/bin/appsink.rs @@ -29,9 +29,7 @@ struct MissingElement(&'static str); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/examples/src/bin/appsrc.rs b/examples/src/bin/appsrc.rs index 604baba21..3c459a0ff 100644 --- a/examples/src/bin/appsrc.rs +++ b/examples/src/bin/appsrc.rs @@ -23,9 +23,7 @@ struct MissingElement(&'static str); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/examples/src/bin/decodebin.rs b/examples/src/bin/decodebin.rs index 13e69570f..e824e7ea6 100644 --- a/examples/src/bin/decodebin.rs +++ b/examples/src/bin/decodebin.rs @@ -25,9 +25,7 @@ struct MissingElement(&'static str); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/examples/src/bin/encodebin.rs b/examples/src/bin/encodebin.rs index 0cd4e1b12..3e775d9f4 100644 --- a/examples/src/bin/encodebin.rs +++ b/examples/src/bin/encodebin.rs @@ -28,9 +28,7 @@ struct MissingElement(&'static str); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/examples/src/bin/pango-cairo.rs b/examples/src/bin/pango-cairo.rs index 46ce1ed7f..840c615db 100644 --- a/examples/src/bin/pango-cairo.rs +++ b/examples/src/bin/pango-cairo.rs @@ -29,9 +29,7 @@ struct MissingElement(&'static str); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/examples/src/bin/rtpfecclient.rs b/examples/src/bin/rtpfecclient.rs index ee8082be7..1ea881fba 100644 --- a/examples/src/bin/rtpfecclient.rs +++ b/examples/src/bin/rtpfecclient.rs @@ -35,9 +35,7 @@ struct UsageError(String); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/examples/src/bin/rtpfecserver.rs b/examples/src/bin/rtpfecserver.rs index f352dedb2..1122427f6 100644 --- a/examples/src/bin/rtpfecserver.rs +++ b/examples/src/bin/rtpfecserver.rs @@ -32,9 +32,7 @@ struct UsageError(String); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/examples/src/bin/tagsetter.rs b/examples/src/bin/tagsetter.rs index 9e4e73be0..3bd520e5f 100644 --- a/examples/src/bin/tagsetter.rs +++ b/examples/src/bin/tagsetter.rs @@ -21,9 +21,7 @@ struct MissingElement(String); #[derive(Debug, Fail)] #[fail( display = "Received error from {}: {} (debug: {:?})", - src, - error, - debug + src, error, debug )] struct ErrorMessage { src: String, diff --git a/gstreamer/src/caps.rs b/gstreamer/src/caps.rs index f0c3aa1d9..3ca873fc5 100644 --- a/gstreamer/src/caps.rs +++ b/gstreamer/src/caps.rs @@ -579,21 +579,19 @@ mod tests { .as_ref() ); } - assert!( - caps.get_features(0) - .unwrap() - .is_equal(::CAPS_FEATURES_MEMORY_SYSTEM_MEMORY.as_ref()) - ); + assert!(caps + .get_features(0) + .unwrap() + .is_equal(::CAPS_FEATURES_MEMORY_SYSTEM_MEMORY.as_ref())); { let caps = caps.get_mut().unwrap(); caps.set_features(0, Some(CapsFeatures::new(&["foo:bla"]))); } - assert!( - caps.get_features(0) - .unwrap() - .is_equal(CapsFeatures::new(&["foo:bla"]).as_ref()) - ); + assert!(caps + .get_features(0) + .unwrap() + .is_equal(CapsFeatures::new(&["foo:bla"]).as_ref())); } #[test] diff --git a/gstreamer/src/caps_serde.rs b/gstreamer/src/caps_serde.rs index 5c1c5206b..14c491873 100644 --- a/gstreamer/src/caps_serde.rs +++ b/gstreamer/src/caps_serde.rs @@ -56,8 +56,8 @@ impl<'a> Serialize for CapsForIterSe<'a> { if size > 0 { let mut seq = serializer.serialize_seq(Some(size))?; for (structure, features) in iter { - let features = if !features.is_any() && features - .is_equal(::CAPS_FEATURES_MEMORY_SYSTEM_MEMORY.as_ref()) + let features = if !features.is_any() + && features.is_equal(::CAPS_FEATURES_MEMORY_SYSTEM_MEMORY.as_ref()) { None } else { @@ -118,11 +118,9 @@ impl<'de> Visitor<'de> for CapsItemVisitor { let structure = seq .next_element::()? .ok_or_else(|| de::Error::custom("Expected a `Structure` for `Caps` item"))?; - let features_option = - seq.next_element::>()? - .ok_or_else(|| de::Error::custom( - "Expected an `Option` for `Caps` item", - ))?; + let features_option = seq.next_element::>()?.ok_or_else(|| { + de::Error::custom("Expected an `Option` for `Caps` item") + })?; Ok(CapsItemDe(structure, features_option)) } diff --git a/gstreamer/src/tags.rs b/gstreamer/src/tags.rs index e3da2de6c..e8ad0fabf 100644 --- a/gstreamer/src/tags.rs +++ b/gstreamer/src/tags.rs @@ -586,7 +586,8 @@ impl<'a, T: Tag<'a>> ExactSizeIterator for TagIterator<'a, T> where >::TagType: 'a, T: 'a, -{} +{ +} pub struct GenericTagIterator<'a> { taglist: &'a TagListRef, @@ -813,22 +814,18 @@ mod tests { let mut tags = TagList::new(); { let tags = tags.get_mut().unwrap(); - assert!( - tags.add_generic(&TAG_TITLE, &"some title", TagMergeMode::Append) - .is_ok() - ); - assert!( - tags.add_generic(&TAG_TITLE, &"second title", TagMergeMode::Append) - .is_ok() - ); - assert!( - tags.add_generic(&TAG_DURATION, &(::SECOND * 120), TagMergeMode::Append) - .is_ok() - ); - assert!( - tags.add_generic(&TAG_TITLE, &"third title", TagMergeMode::Append) - .is_ok() - ); + assert!(tags + .add_generic(&TAG_TITLE, &"some title", TagMergeMode::Append) + .is_ok()); + assert!(tags + .add_generic(&TAG_TITLE, &"second title", TagMergeMode::Append) + .is_ok()); + assert!(tags + .add_generic(&TAG_DURATION, &(::SECOND * 120), TagMergeMode::Append) + .is_ok()); + assert!(tags + .add_generic(&TAG_TITLE, &"third title", TagMergeMode::Append) + .is_ok()); assert_eq!( tags.add_generic(