core: use assoc types in Deref[Mut]

This commit is contained in:
Jorge Aparicio
2015-01-01 14:53:20 -05:00
parent d555772554
commit 64b7c22c46
49 changed files with 256 additions and 107 deletions

View File

@@ -75,7 +75,9 @@ impl<T: 'static> P<T> {
}
}
impl<T> Deref<T> for P<T> {
impl<T> Deref for P<T> {
type Target = T;
fn deref<'a>(&'a self) -> &'a T {
&*self.ptr
}