rustfmt fixes

This commit is contained in:
Drakulix 2017-05-21 22:50:50 +02:00
parent 5bc641852f
commit 786d719dad
2 changed files with 5 additions and 7 deletions

View File

@ -386,8 +386,9 @@ impl EGLContext {
let surface = {
let surface = match native {
Native::X11(_, window) | Native::Wayland(_, window) | Native::Gbm(_, window) =>
egl.CreateWindowSurface(display, config_id, window, ptr::null()),
Native::X11(_, window) |
Native::Wayland(_, window) |
Native::Gbm(_, window) => egl.CreateWindowSurface(display, config_id, window, ptr::null()),
};
if surface.is_null() {
@ -399,10 +400,7 @@ impl EGLContext {
let mut context_attributes = Vec::with_capacity(10);
let mut flags = 0;
if egl_version >= (1, 5) ||
extensions
.iter()
.any(|s| s == &"EGL_KHR_create_context") {
if egl_version >= (1, 5) || extensions.iter().any(|s| s == &"EGL_KHR_create_context") {
context_attributes.push(ffi::egl::CONTEXT_MAJOR_VERSION as i32);
context_attributes.push(version.0 as i32);
context_attributes.push(ffi::egl::CONTEXT_MINOR_VERSION as i32);

View File

@ -18,7 +18,7 @@ use wayland_client::egl as wegl;
use winit::{CreationError as WinitCreationError, ElementState, Event, EventsLoop,
MouseButton as WinitMouseButton, MouseCursor, MouseScrollDelta, Touch, TouchPhase, Window,
WindowBuilder, WindowEvent};
use winit::os::unix::{get_x11_xconnection, WindowExt};
use winit::os::unix::{WindowExt, get_x11_xconnection};
/// Window with an active EGL Context created by `winit`. Implements the
/// `EGLGraphicsBackend` graphics backend trait