From e122ffa6ad652a8565fcbdc6325d4b4816884b29 Mon Sep 17 00:00:00 2001 From: est31 Date: Sat, 11 Dec 2021 08:21:26 +0100 Subject: [PATCH] Future proof the API a little Don't expose Takeable in these two instances. The type is still exposed by the Deref impls, for which we need TAIT. --- src/backend/glutin/headless.rs | 4 ++-- src/backend/glutin/mod.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/glutin/headless.rs b/src/backend/glutin/headless.rs index 67223775b20..ae20ef486b4 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 3d71d9e0458..9de704e8d64 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 } }