Skip to content

Commit 89454d6

Browse files
authored
Fix lifetime warnings in Image (#34)
1 parent 838808c commit 89454d6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/src/image.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl<'a> Image<'a> {
122122
mut format: bindings::VAImageFormat,
123123
coded_resolution: (u32, u32),
124124
visible_rect: (u32, u32),
125-
) -> Result<Image, VaError> {
125+
) -> Result<Image<'a>, VaError> {
126126
// An all-zero byte-pattern is a valid initial value for `VAImage`.
127127
let mut image: bindings::VAImage = Default::default();
128128
let dpy = surface.display().handle();

lib/src/picture.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ impl<S: PictureReclaimableSurface, T> Picture<S, T> {
277277
pub fn derive_image<'a, D: SurfaceMemoryDescriptor + 'a>(
278278
&'a self,
279279
visible_rect: (u32, u32),
280-
) -> Result<Image, VaError>
280+
) -> Result<Image<'a>, VaError>
281281
where
282282
T: Borrow<Surface<D>>,
283283
{
@@ -292,7 +292,7 @@ impl<S: PictureReclaimableSurface, T> Picture<S, T> {
292292
format: bindings::VAImageFormat,
293293
coded_resolution: (u32, u32),
294294
visible_rect: (u32, u32),
295-
) -> Result<Image, VaError>
295+
) -> Result<Image<'a>, VaError>
296296
where
297297
T: Borrow<Surface<D>>,
298298
{

0 commit comments

Comments
 (0)