From cd24d93c892eab32a285e755d0cdca512ad74a2c Mon Sep 17 00:00:00 2001 From: Avril Date: Thu, 10 Sep 2020 15:21:19 +0100 Subject: [PATCH] slight change to handle internals --- src/handle.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/handle.rs b/src/handle.rs index d85cc70..e550fc1 100644 --- a/src/handle.rs +++ b/src/handle.rs @@ -13,13 +13,13 @@ pub(crate) trait AsHandle self.as_handle() as *mut Handle } } -/*impl AsHandle for Handle +impl AsHandle for Handle //this is kinda silly, but its internal and we'll know to never use this { #[inline] fn as_handle(&mut self) -> &mut Handle { self } -}*/ //intentionally leave this unimplemented? +} impl AsHandle for *mut Handle { @@ -32,8 +32,9 @@ impl AsHandle for *mut Handle *self } } + impl<'a, T: GhostHandle, U> AsHandle for &'a mut U -where U: AsHandle +where &'a mut U: AsHandle { fn as_handle(&mut self) -> &mut Handle {