Fix bare_trait_objects deprecation

This commit is contained in:
Zhiming Wang 2020-05-31 14:08:25 +08:00
parent d3c10e4068
commit 13a2354a2c
No known key found for this signature in database
GPG Key ID: 5B58F95EC95965D8
3 changed files with 5 additions and 5 deletions

View File

@ -11,13 +11,13 @@ use {Codec, Error};
pub struct Context {
ptr: *mut AVCodecContext,
owner: Option<Rc<Drop>>,
owner: Option<Rc<dyn Drop>>,
}
unsafe impl Send for Context {}
impl Context {
pub unsafe fn wrap(ptr: *mut AVCodecContext, owner: Option<Rc<Drop>>) -> Self {
pub unsafe fn wrap(ptr: *mut AVCodecContext, owner: Option<Rc<dyn Drop>>) -> Self {
Context {
ptr: ptr,
owner: owner,

View File

@ -6,13 +6,13 @@ use media;
pub struct Parameters {
ptr: *mut AVCodecParameters,
owner: Option<Rc<Drop>>,
owner: Option<Rc<dyn Drop>>,
}
unsafe impl Send for Parameters {}
impl Parameters {
pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option<Rc<Drop>>) -> Self {
pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option<Rc<dyn Drop>>) -> Self {
Parameters {
ptr: ptr,
owner: owner,

View File

@ -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,