Merge pull request #76 from zmwangx/fix-linting

Fix linting errors
This commit is contained in:
Polochon-street 2021-10-02 23:30:31 +02:00 committed by GitHub
commit 1955c3ddeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

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

View File

@ -1,3 +1,4 @@
use std::any::Any;
use std::rc::Rc;
use super::{Context, Id};
@ -6,13 +7,13 @@ use media;
pub struct Parameters {
ptr: *mut AVCodecParameters,
owner: Option<Rc<dyn Drop>>,
owner: Option<Rc<dyn Any>>,
}
unsafe impl Send for Parameters {}
impl Parameters {
pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option<Rc<dyn Drop>>) -> Self {
pub unsafe fn wrap(ptr: *mut AVCodecParameters, owner: Option<Rc<dyn Any>>) -> Self {
Parameters { ptr, owner }
}