forked from mirrors/gstreamer-rs
fix option_as_ref_deref clippy warnings
This commit is contained in:
parent
20b672eae3
commit
872024c372
2 changed files with 2 additions and 11 deletions
|
@ -771,8 +771,6 @@ where
|
|||
T: BaseSrcImpl,
|
||||
T::Instance: PanicPoison,
|
||||
{
|
||||
use std::ops::DerefMut;
|
||||
|
||||
let instance = &*(ptr as *mut T::Instance);
|
||||
let imp = instance.get_impl();
|
||||
let wrap: Borrowed<BaseSrc> = from_glib_borrow(ptr);
|
||||
|
@ -787,12 +785,7 @@ where
|
|||
};
|
||||
|
||||
gst_panic_to_error!(&wrap, &instance.panicked(), gst::FlowReturn::Error, {
|
||||
match imp.create(
|
||||
&wrap,
|
||||
offset,
|
||||
buffer.as_mut().map(|b| b.deref_mut()),
|
||||
length,
|
||||
) {
|
||||
match imp.create(&wrap, offset, buffer.as_deref_mut(), length) {
|
||||
Ok(CreateSuccess::NewBuffer(new_buffer)) => {
|
||||
if let Some(passed_buffer) = buffer {
|
||||
if passed_buffer.as_ptr() != new_buffer.as_ptr() {
|
||||
|
|
|
@ -1397,8 +1397,6 @@ unsafe extern "C" fn trampoline_getrange_function<
|
|||
where
|
||||
T: IsA<Pad>,
|
||||
{
|
||||
use std::ops::DerefMut;
|
||||
|
||||
let func: &F = &*((*pad).getrangedata as *const F);
|
||||
|
||||
assert!(!buffer.is_null());
|
||||
|
@ -1417,7 +1415,7 @@ where
|
|||
.as_ref()
|
||||
.as_ref(),
|
||||
offset,
|
||||
passed_buffer.as_mut().map(|b| b.deref_mut()),
|
||||
passed_buffer.as_deref_mut(),
|
||||
length,
|
||||
) {
|
||||
Ok(PadGetRangeSuccess::NewBuffer(new_buffer)) => {
|
||||
|
|
Loading…
Reference in a new issue