From 20f1666bc92a165cee8e3c84f603ff6614f02969 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 7 Oct 2017 04:41:45 +0300 Subject: [PATCH] Run everything through rustfmt again --- gst-plugin-audiofx/src/audioecho.rs | 15 +++++++++------ gst-plugin/src/base_sink.rs | 4 +--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/gst-plugin-audiofx/src/audioecho.rs b/gst-plugin-audiofx/src/audioecho.rs index 2063061b..3bdeacb0 100644 --- a/gst-plugin-audiofx/src/audioecho.rs +++ b/gst-plugin-audiofx/src/audioecho.rs @@ -158,9 +158,13 @@ impl AudioEcho { Box::new(imp) } - fn process(data: &mut [F], state: &mut State, settings: &Settings) { - let delay_frames = (settings.delay as usize) * (state.info.channels() as usize) * (state.info.rate() as usize) / - (gst::SECOND as usize); + fn process( + data: &mut [F], + state: &mut State, + settings: &Settings, + ) { + let delay_frames = (settings.delay as usize) * (state.info.channels() as usize) * + (state.info.rate() as usize) / (gst::SECOND as usize); for (i, (o, e)) in data.iter_mut().zip(state.buffer.iter(delay_frames)) { let inp = (*i).to_f64().unwrap(); @@ -228,7 +232,6 @@ impl ObjectImpl for AudioEcho { impl ElementImpl for AudioEcho {} impl BaseTransformImpl for AudioEcho { - fn transform_ip(&self, _element: &RsBaseTransform, buf: &gst::Buffer) -> gst::FlowReturn { let mut settings = *self.settings.lock().unwrap(); settings.delay = cmp::min(settings.max_delay, settings.delay); @@ -248,11 +251,11 @@ impl BaseTransformImpl for AudioEcho { gst_audio::AUDIO_FORMAT_F64 => { let mut data = map.as_mut_slice().as_mut_slice_of::().unwrap(); Self::process(data, state, &settings); - }, + } gst_audio::AUDIO_FORMAT_F32 => { let mut data = map.as_mut_slice().as_mut_slice_of::().unwrap(); Self::process(data, state, &settings); - }, + } _ => return gst::FlowReturn::NotNegotiated, } diff --git a/gst-plugin/src/base_sink.rs b/gst-plugin/src/base_sink.rs index c677d803..b01cedbd 100644 --- a/gst-plugin/src/base_sink.rs +++ b/gst-plugin/src/base_sink.rs @@ -113,9 +113,7 @@ pub unsafe trait BaseSink let parent_klass = (*klass).get_parent_class() as *const gst_base_ffi::GstBaseSinkClass; (*parent_klass) .event - .map(|f| { - from_glib(f(self.to_glib_none().0, event.into_ptr())) - }) + .map(|f| from_glib(f(self.to_glib_none().0, event.into_ptr()))) .unwrap_or(false) } }