diff --git a/src/backend/glutin/headless.rs b/src/backend/glutin/headless.rs index 67223775b2..ae20ef486b 100644 --- a/src/backend/glutin/headless.rs +++ b/src/backend/glutin/headless.rs @@ -30,7 +30,7 @@ impl Deref for Headless { impl Deref for GlutinBackend { type Target = Rc>>>; - fn deref(&self) -> &Rc>>> { + fn deref(&self) -> &Self::Target { &self.0 } } @@ -121,7 +121,7 @@ impl Headless { } /// Borrow the inner glutin context - pub fn gl_context(&self) -> Ref<'_, Takeable>> { + pub fn gl_context(&self) -> Ref<'_, impl Deref>> { self.glutin.borrow() } diff --git a/src/backend/glutin/mod.rs b/src/backend/glutin/mod.rs index 3d71d9e045..9de704e8d6 100644 --- a/src/backend/glutin/mod.rs +++ b/src/backend/glutin/mod.rs @@ -162,7 +162,7 @@ impl Display { /// Borrow the inner glutin WindowedContext. #[inline] - pub fn gl_window(&self) -> Ref<'_, Takeable>> { + pub fn gl_window(&self) -> Ref<'_, impl Deref>> { self.gl_window.borrow() } @@ -240,7 +240,7 @@ impl backend::Facade for Display { impl Deref for GlutinBackend { type Target = Rc>>>; #[inline] - fn deref(&self) -> &Rc>>> { + fn deref(&self) -> &Self::Target { &self.0 } }