codec/parameters: impl AsRef for all codec::Context wrappers

This commit is contained in:
Tae-il Lim
2016-12-01 15:30:31 +09:00
committed by meh
parent 36ac2513c1
commit 4df56b516f
11 changed files with 82 additions and 7 deletions

View File

@ -6,7 +6,7 @@ use ffi::*;
use super::Encoder as Super;
use ::{Error, Dictionary};
use codec::traits;
use codec::{traits, Context};
pub struct Subtitle(pub Super);
@ -68,6 +68,12 @@ impl DerefMut for Subtitle {
}
}
impl AsRef<Context> for Subtitle {
fn as_ref(&self) -> &Context {
&self
}
}
pub struct Encoder(pub Subtitle);
impl Encoder {
@ -88,3 +94,9 @@ impl Deref for Encoder {
&self.0
}
}
impl AsRef<Context> for Encoder {
fn as_ref(&self) -> &Context {
&self
}
}