slight change to handle internals

master
Avril 4 years ago
parent bdde2e873b
commit cd24d93c89
Signed by: flanchan
GPG Key ID: 284488987C31F630

@ -13,13 +13,13 @@ pub(crate) trait AsHandle<T: GhostHandle>
self.as_handle() as *mut Handle<T>
}
}
/*impl<T: GhostHandle> AsHandle<T> for Handle<T>
impl<T: GhostHandle> AsHandle<T> for Handle<T> //this is kinda silly, but its internal and we'll know to never use this
{
#[inline] fn as_handle(&mut self) -> &mut Handle<T>
{
self
}
}*/ //intentionally leave this unimplemented?
}
impl<T: GhostHandle> AsHandle<T> for *mut Handle<T>
{
@ -32,8 +32,9 @@ impl<T: GhostHandle> AsHandle<T> for *mut Handle<T>
*self
}
}
impl<'a, T: GhostHandle, U> AsHandle<T> for &'a mut U
where U: AsHandle<T>
where &'a mut U: AsHandle<T>
{
fn as_handle(&mut self) -> &mut Handle<T>
{

Loading…
Cancel
Save