From a43c78f2c5d6da83ea57c7a7e110fe19399099c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 28 Sep 2018 12:01:14 +0300 Subject: [PATCH] Run everything through rustfmt --- gstreamer/src/event.rs | 3 +-- gstreamer/src/lib.rs | 7 +++++-- gstreamer/src/message.rs | 9 +++------ gstreamer/src/query.rs | 3 +-- gstreamer/src/typefind.rs | 6 ++---- 5 files changed, 12 insertions(+), 16 deletions(-) diff --git a/gstreamer/src/event.rs b/gstreamer/src/event.rs index 8183f6368..800d293cc 100644 --- a/gstreamer/src/event.rs +++ b/gstreamer/src/event.rs @@ -465,8 +465,7 @@ impl fmt::Debug for EventRef { .field("type", &unsafe { let type_ = ffi::gst_event_type_get_name((*self.as_ptr()).type_); CStr::from_ptr(type_).to_str().unwrap() - }) - .field("seqnum", &self.get_seqnum()) + }).field("seqnum", &self.get_seqnum()) .field("structure", &self.get_structure()) .finish() } diff --git a/gstreamer/src/lib.rs b/gstreamer/src/lib.rs index 6ed51f0f6..f0f752a16 100644 --- a/gstreamer/src/lib.rs +++ b/gstreamer/src/lib.rs @@ -89,10 +89,13 @@ mod structure_serde; pub mod caps; pub use caps::{Caps, CapsRef}; +mod caps_features; #[cfg(feature = "ser_de")] mod caps_serde; -mod caps_features; -pub use caps_features::{CapsFeatures, CapsFeaturesRef, CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, CAPS_FEATURES_MEMORY_SYSTEM_MEMORY}; +pub use caps_features::{ + CapsFeatures, CapsFeaturesRef, CAPS_FEATURES_MEMORY_SYSTEM_MEMORY, + CAPS_FEATURE_MEMORY_SYSTEM_MEMORY, +}; #[cfg(feature = "ser_de")] mod caps_features_serde; diff --git a/gstreamer/src/message.rs b/gstreamer/src/message.rs index 8b7abc10d..51f53efb6 100644 --- a/gstreamer/src/message.rs +++ b/gstreamer/src/message.rs @@ -361,8 +361,7 @@ impl fmt::Debug for MessageRef { .field("type", &unsafe { let type_ = ffi::gst_message_type_get_name((*self.as_ptr()).type_); CStr::from_ptr(type_).to_str().unwrap() - }) - .field("seqnum", &self.get_seqnum()) + }).field("seqnum", &self.get_seqnum()) .field("src", &self.get_src().map(|s| s.get_name())) .field("structure", &self.get_structure()) .finish() @@ -1114,8 +1113,7 @@ impl<'a> StreamsSelected<'a> { self.as_mut_ptr(), i, )) - }) - .collect() + }).collect() } } } @@ -1152,8 +1150,7 @@ impl<'a> Redirect<'a> { from_glib_none(tags), structure, ) - }) - .collect() + }).collect() } } } diff --git a/gstreamer/src/query.rs b/gstreamer/src/query.rs index 55af11a3c..023e8e4dd 100644 --- a/gstreamer/src/query.rs +++ b/gstreamer/src/query.rs @@ -212,8 +212,7 @@ impl fmt::Debug for QueryRef { .field("type", &unsafe { let type_ = ffi::gst_query_type_get_name((*self.as_ptr()).type_); CStr::from_ptr(type_).to_str().unwrap() - }) - .field("structure", &self.get_structure()) + }).field("structure", &self.get_structure()) .finish() } } diff --git a/gstreamer/src/typefind.rs b/gstreamer/src/typefind.rs index 9b40aa9ad..c6181bf20 100644 --- a/gstreamer/src/typefind.rs +++ b/gstreamer/src/typefind.rs @@ -248,10 +248,8 @@ mod tests { c.get_structure(0) .map(|s| s.get_name() == "application/xml") .unwrap_or(false) - }) - .unwrap_or(false) - }) - .unwrap(); + }).unwrap_or(false) + }).unwrap(); let data = b"test"; let data = &data[..];