From 95fbce096cd0997be2217732ed47078518c03d89 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 27 Dec 2020 11:41:04 +0100 Subject: [PATCH] Fix clippy::unnecessary-lazy-evaluations warnings Signed-off-by: Uli Schlachter --- src/backend/egl/native.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 {