Fix clippy::unnecessary-lazy-evaluations warnings
Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
9e14e43bd8
commit
95fbce096c
|
@ -158,13 +158,13 @@ unsafe impl NativeDisplay<X11> for WinitWindow {
|
||||||
fn ptr(&self) -> Result<ffi::NativeDisplayType, Error> {
|
fn ptr(&self) -> Result<ffi::NativeDisplayType, Error> {
|
||||||
self.xlib_display()
|
self.xlib_display()
|
||||||
.map(|ptr| ptr as *const _)
|
.map(|ptr| ptr as *const _)
|
||||||
.ok_or_else(|| Error::NonMatchingBackend("X11"))
|
.ok_or(Error::NonMatchingBackend("X11"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_surface(&mut self, _args: ()) -> Result<XlibWindow, Error> {
|
fn create_surface(&mut self, _args: ()) -> Result<XlibWindow, Error> {
|
||||||
self.xlib_window()
|
self.xlib_window()
|
||||||
.map(XlibWindow)
|
.map(XlibWindow)
|
||||||
.ok_or_else(|| Error::NonMatchingBackend("X11"))
|
.ok_or(Error::NonMatchingBackend("X11"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@ unsafe impl NativeDisplay<Wayland> for WinitWindow {
|
||||||
fn ptr(&self) -> Result<ffi::NativeDisplayType, Error> {
|
fn ptr(&self) -> Result<ffi::NativeDisplayType, Error> {
|
||||||
self.wayland_display()
|
self.wayland_display()
|
||||||
.map(|ptr| ptr as *const _)
|
.map(|ptr| ptr as *const _)
|
||||||
.ok_or_else(|| Error::NonMatchingBackend("Wayland"))
|
.ok_or(Error::NonMatchingBackend("Wayland"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_surface(&mut self, _args: ()) -> Result<wegl::WlEglSurface, Error> {
|
fn create_surface(&mut self, _args: ()) -> Result<wegl::WlEglSurface, Error> {
|
||||||
|
|
Loading…
Reference in New Issue