threadshare: Fix some clippy warnings

This commit is contained in:
Sebastian Dröge 2020-03-15 13:40:45 +02:00
parent bfedca6cfe
commit 9ddcae4ed2
3 changed files with 7 additions and 13 deletions

View file

@ -1281,8 +1281,7 @@ impl JitterBuffer {
let context = {
let settings = self.settings.lock().unwrap();
let context = Context::acquire(&settings.context, settings.context_wait).unwrap();
context
Context::acquire(&settings.context, settings.context_wait).unwrap()
};
self.src_pad

View file

@ -360,7 +360,7 @@ impl UdpSinkPadHandler {
)]),
clients_to_configure: vec![],
sender: Arc::new(Mutex::new(None)),
settings: settings,
settings,
})))
}
@ -680,11 +680,9 @@ impl PadSinkHandler for UdpSinkPadHandler {
async move {
if let EventView::FlushStop(_) = event.view() {
this.start_task(&element);
} else {
if let Some(sender) = sender.lock().await.as_mut() {
} else if let Some(sender) = sender.lock().await.as_mut() {
sender.send(TaskItem::Event(event)).await.unwrap();
}
}
true
}
.boxed()
@ -1097,7 +1095,7 @@ impl ObjectSubclass for UdpSink {
Self {
sink_pad,
sink_pad_handler,
settings: settings,
settings,
}
}
}

View file

@ -516,16 +516,13 @@ impl PadSinkHandler for PadSinkHandlerTest {
) -> bool {
gst_debug!(SINK_CAT, obj: pad.gst_pad(), "Handling non-serialized {:?}", event);
let ret = match event.view() {
match event.view() {
EventView::FlushStart(..) => {
elem_sink_test.stop(&element);
true
}
_ => false,
};
// Should forward item here
ret
}
}
fn sink_event_serialized(