util/frame/audio: implement DerefMut
This commit is contained in:
parent
82ab89d1bf
commit
c1d4a1f136
@ -1,6 +1,6 @@
|
||||
use libc::c_int;
|
||||
use std::mem;
|
||||
use std::ops::Deref;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
|
||||
use ffi::*;
|
||||
use ::util::format;
|
||||
@ -98,11 +98,17 @@ unsafe impl Send for Audio { }
|
||||
impl Deref for Audio {
|
||||
type Target = Frame;
|
||||
|
||||
fn deref(&self) -> &Frame {
|
||||
fn deref(&self) -> &<Self as Deref>::Target {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl DerefMut for Audio {
|
||||
fn deref_mut(&mut self) -> &mut<Self as Deref>::Target {
|
||||
&mut self.0
|
||||
}
|
||||
}
|
||||
|
||||
impl Clone for Audio {
|
||||
fn clone(&self) -> Self {
|
||||
Audio(self.0.clone())
|
||||
|
Loading…
x
Reference in New Issue
Block a user