Run everything through latest rustfmt-nightly

This commit is contained in:
Sebastian Dröge 2018-02-22 11:23:34 +01:00
parent e7b12d87f9
commit da433f92af
7 changed files with 23 additions and 46 deletions

View file

@ -1127,7 +1127,8 @@ impl ToggleRecord {
let (flags, min, max, align) = new_query.get_result();
q.set(flags, min, max, align);
q.add_scheduling_modes(&new_query.get_scheduling_modes()
q.add_scheduling_modes(&new_query
.get_scheduling_modes()
.iter()
.cloned()
.filter(|m| m != &gst::PadMode::Pull)

View file

@ -304,9 +304,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.start(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.start(&wrap) }).to_glib()
}
unsafe extern "C" fn base_sink_stop<T: BaseSinkBase>(
@ -320,9 +318,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.stop(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.stop(&wrap) }).to_glib()
}
unsafe extern "C" fn base_sink_render<T: BaseSinkBase>(
@ -502,9 +498,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.unlock(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.unlock(&wrap) }).to_glib()
}
unsafe extern "C" fn base_sink_unlock_stop<T: BaseSinkBase>(
@ -518,7 +512,5 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.unlock_stop(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.unlock_stop(&wrap) }).to_glib()
}

View file

@ -375,9 +375,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.start(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.start(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_stop<T: BaseSrcBase>(
@ -391,9 +389,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.stop(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.stop(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_is_seekable<T: BaseSrcBase>(
@ -407,9 +403,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.is_seekable(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.is_seekable(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_get_size<T: BaseSrcBase>(
@ -569,9 +563,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.negotiate(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.negotiate(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_set_caps<T: BaseSrcBase>(
@ -621,9 +613,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.unlock(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.unlock(&wrap) }).to_glib()
}
unsafe extern "C" fn base_src_unlock_stop<T: BaseSrcBase>(
@ -637,7 +627,5 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.unlock_stop(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.unlock_stop(&wrap) }).to_glib()
}

View file

@ -315,7 +315,8 @@ glib_wrapper! {
}
unsafe impl<T: IsA<gst::Element> + IsA<gst_base::BaseTransform> + ObjectType> BaseTransformBase
for T {
for T
{
}
pub type BaseTransformClass = ClassStruct<BaseTransform>;
@ -432,9 +433,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.start(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.start(&wrap) }).to_glib()
}
unsafe extern "C" fn base_transform_stop<T: BaseTransformBase>(
@ -448,9 +447,7 @@ where
let wrap: T = from_glib_borrow(ptr as *mut InstanceStruct<T>);
let imp = &*element.imp;
panic_to_error!(&wrap, &element.panicked, false, {
imp.stop(&wrap)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.stop(&wrap) }).to_glib()
}
unsafe extern "C" fn base_transform_transform_caps<T: BaseTransformBase>(

View file

@ -339,9 +339,7 @@ where
let imp = &*element.imp;
let query = gst::QueryRef::from_mut_ptr(query);
panic_to_error!(&wrap, &element.panicked, false, {
imp.query(&wrap, query)
}).to_glib()
panic_to_error!(&wrap, &element.panicked, false, { imp.query(&wrap, query) }).to_glib()
}
unsafe extern "C" fn element_set_context<T: ElementBase>(

View file

@ -8,19 +8,19 @@
// except according to those terms.
extern crate byteorder;
pub extern crate glib_sys as glib_ffi;
pub extern crate gobject_sys as gobject_ffi;
extern crate gstreamer_base_sys as gst_base_ffi;
pub extern crate gstreamer_sys as gst_ffi;
#[macro_use]
extern crate lazy_static;
extern crate libc;
pub extern crate glib_sys as glib_ffi;
pub extern crate gobject_sys as gobject_ffi;
pub extern crate gstreamer_sys as gst_ffi;
extern crate gstreamer_base as gst_base;
#[macro_use]
pub extern crate glib;
#[macro_use]
pub extern crate gstreamer as gst;
extern crate gstreamer_base as gst_base;
macro_rules! floating_reference_guard {
($obj:ident) => (

View file

@ -54,7 +54,8 @@ glib_wrapper! {
}
unsafe impl<T: IsA<gst::Element> + IsA<gst::Bin> + IsA<gst::Pipeline> + ObjectType> PipelineBase
for T {
for T
{
}
pub type PipelineClass = ClassStruct<Pipeline>;