From 13a2354a2c0c27ef46bc8200489e594a9649c365 Mon Sep 17 00:00:00 2001 From: Zhiming Wang Date: Sun, 31 May 2020 14:08:25 +0800 Subject: [PATCH] Fix bare_trait_objects deprecation --- src/codec/context.rs | 4 ++-- src/codec/parameters.rs | 4 ++-- src/util/format/pixel.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/codec/context.rs b/src/codec/context.rs index d30dd82..6089538 100644 --- a/src/codec/context.rs +++ b/src/codec/context.rs @@ -11,13 +11,13 @@ use {Codec, Error}; pub struct Context { ptr: *mut AVCodecContext, - owner: Option>, + owner: Option>, } unsafe impl Send for Context {} impl Context { - pub unsafe fn wrap(ptr: *mut AVCodecContext, owner: Option>) -> Self { + pub unsafe fn wrap(ptr: *mut AVCodecContext, owner: Option>) -> Self { Context { ptr: ptr, owner: owner, diff --git a/src/codec/parameters.rs b/src/codec/parameters.rs index 2ce5b9d..115b33f 100644 --- a/src/codec/parameters.rs +++ b/src/codec/parameters.rs @@ -6,13 +6,13 @@ use media; pub struct Parameters { ptr: *mut AVCodecParameters, - owner: Option>, + owner: Option>, } unsafe impl Send for Parameters {} impl Parameters { - pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option>) -> Self { + pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option>) -> Self { Parameters { ptr: ptr, owner: owner, diff --git a/src/util/format/pixel.rs b/src/util/format/pixel.rs index 2aee470..2f7cf1d 100644 --- a/src/util/format/pixel.rs +++ b/src/util/format/pixel.rs @@ -937,7 +937,7 @@ impl error::Error for ParsePixelError { } } - fn cause(&self) -> Option<&error::Error> { + fn cause(&self) -> Option<&dyn error::Error> { match *self { ParsePixelError::NulError(ref e) => Some(e), ParsePixelError::UnknownFormat => None,