diff --git a/src/backend/egl/native.rs b/src/backend/egl/native.rs index b878cf3..8ffce1d 100644 --- a/src/backend/egl/native.rs +++ b/src/backend/egl/native.rs @@ -158,13 +158,13 @@ unsafe impl NativeDisplay for WinitWindow { fn ptr(&self) -> Result { self.xlib_display() .map(|ptr| ptr as *const _) - .ok_or_else(|| Error::NonMatchingBackend("X11")) + .ok_or(Error::NonMatchingBackend("X11")) } fn create_surface(&mut self, _args: ()) -> Result { self.xlib_window() .map(XlibWindow) - .ok_or_else(|| Error::NonMatchingBackend("X11")) + .ok_or(Error::NonMatchingBackend("X11")) } } @@ -179,7 +179,7 @@ unsafe impl NativeDisplay for WinitWindow { fn ptr(&self) -> Result { self.wayland_display() .map(|ptr| ptr as *const _) - .ok_or_else(|| Error::NonMatchingBackend("Wayland")) + .ok_or(Error::NonMatchingBackend("Wayland")) } fn create_surface(&mut self, _args: ()) -> Result {