video/video_rectangle: Implement glib::translate::Uninitialized

The new Vulkan bindings require this.
This commit is contained in:
Marijn Suijten 2021-01-03 21:36:27 +01:00
parent c68b601c74
commit 430abb1e9d

View file

@ -1,6 +1,7 @@
// Take a look at the license at the top of the repository in the LICENSE file.
use glib::translate::IntoGlib;
use std::mem;
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
pub struct VideoRectangle {
@ -46,3 +47,10 @@ pub fn center_video_rectangle(
}
VideoRectangle::new(result.x, result.y, result.w, result.h)
}
#[doc(hidden)]
impl glib::translate::Uninitialized for VideoRectangle {
unsafe fn uninitialized() -> Self {
mem::zeroed()
}
}