From d9ab91a80d98e5255c42e68a29db451dce969e7d Mon Sep 17 00:00:00 2001 From: Christian Duerr Date: Sat, 4 May 2024 19:18:24 +0200 Subject: [PATCH] Remove unnecessary abstractions --- glutin/src/display.rs | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/glutin/src/display.rs b/glutin/src/display.rs index dc6117cf3b..25aa99888b 100644 --- a/glutin/src/display.rs +++ b/glutin/src/display.rs @@ -20,12 +20,10 @@ use crate::surface::{ use crate::api::cgl::display::Display as CglDisplay; #[cfg(egl_backend)] use crate::api::egl::display::Display as EglDisplay; -#[cfg(egl_backend)] -use crate::api::egl::Egl; #[cfg(glx_backend)] use crate::api::glx::display::Display as GlxDisplay; #[cfg(glx_backend)] -use crate::api::glx::{Glx, XlibErrorHookRegistrar}; +use crate::api::glx::XlibErrorHookRegistrar; #[cfg(wgl_backend)] use crate::api::wgl::display::Display as WglDisplay; @@ -257,24 +255,6 @@ impl Display { DisplayApiPreference::Cgl => unsafe { Ok(Self::Cgl(CglDisplay::new(display)?)) }, } } - - /// Get a reference to the initialized EGL API. - #[cfg(egl_backend)] - pub fn egl(&self) -> Option<&'static Egl> { - match self { - Self::Egl(egl_display) => Some(egl_display.egl()), - _ => None, - } - } - - /// Get a reference to the initialized GLX API. - #[cfg(glx_backend)] - pub fn glx(&self) -> Option<&'static Glx> { - match self { - Self::Glx(glx_display) => Some(glx_display.glx()), - _ => None, - } - } } impl GlDisplay for Display {