Remove unnecessary unsafe blocks for Buffer::as_ptr()

This commit is contained in:
Sebastian Dröge 2022-08-12 18:12:22 +03:00
parent 35b42b88d9
commit 2b61d51e91
2 changed files with 2 additions and 2 deletions

View file

@ -199,7 +199,7 @@ impl OnvifOverlay {
// Pass ownership of the buffer to the cairo surface but keep around
// a raw pointer so we can later retrieve it again when the surface
// is done
let buffer_ptr = unsafe { buffer.buffer().as_ptr() };
let buffer_ptr = buffer.buffer().as_ptr();
let surface = cairo::ImageSurface::create_for_data(
buffer,
cairo::Format::ARgb32,

View file

@ -196,7 +196,7 @@ impl Cea608Overlay {
// Pass ownership of the buffer to the cairo surface but keep around
// a raw pointer so we can later retrieve it again when the surface
// is done
let buffer_ptr = unsafe { buffer.buffer().as_ptr() };
let buffer_ptr = buffer.buffer().as_ptr();
let surface = cairo::ImageSurface::create_for_data(
buffer,
cairo::Format::ARgb32,