From e60374a459525c97856b21de3e24bf7d41d9f720 Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Tue, 13 Jul 2021 14:18:23 +0200 Subject: [PATCH] Fix unused imports --- src/backend/egl/native.rs | 8 ++++---- src/backend/renderer/mod.rs | 9 ++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/backend/egl/native.rs b/src/backend/egl/native.rs index f9aedde..fcb1e97 100644 --- a/src/backend/egl/native.rs +++ b/src/backend/egl/native.rs @@ -1,7 +1,9 @@ //! Type safe native types for safe context/surface creation use super::{display::EGLDisplayHandle, ffi, wrap_egl_call, SwapBuffersError}; -use nix::libc::{c_int, c_void}; +#[cfg(feature = "backend_winit")] +use std::os::raw::c_int; +use std::os::raw::c_void; #[cfg(feature = "backend_gbm")] use std::os::unix::io::AsRawFd; use std::{fmt::Debug, marker::PhantomData, sync::Arc}; @@ -9,9 +11,7 @@ use std::{fmt::Debug, marker::PhantomData, sync::Arc}; #[cfg(feature = "backend_winit")] use wayland_egl as wegl; #[cfg(feature = "backend_winit")] -use winit::platform::unix::WindowExtUnix; -#[cfg(feature = "backend_winit")] -use winit::window::Window as WinitWindow; +use winit::{platform::unix::WindowExtUnix, window::Window as WinitWindow}; #[cfg(feature = "backend_gbm")] use gbm::{AsRaw, Device as GbmDevice}; diff --git a/src/backend/renderer/mod.rs b/src/backend/renderer/mod.rs index 60aebbe..2bad97b 100644 --- a/src/backend/renderer/mod.rs +++ b/src/backend/renderer/mod.rs @@ -10,7 +10,7 @@ use std::collections::HashSet; use std::error::Error; -use crate::utils::{Buffer, Physical, Point, Size}; +use crate::utils::{Physical, Point, Size}; #[cfg(feature = "wayland_frontend")] use crate::{utils::Rectangle, wayland::compositor::SurfaceData}; @@ -20,8 +20,6 @@ use wayland_server::protocol::{wl_buffer, wl_shm}; #[cfg(feature = "renderer_gl")] pub mod gles2; -#[cfg(feature = "wayland_frontend")] -use crate::backend::allocator::{dmabuf::Dmabuf, Format}; #[cfg(all( feature = "wayland_frontend", feature = "backend_egl", @@ -31,6 +29,11 @@ use crate::backend::egl::{ display::{EGLBufferReader, BUFFER_READER}, Error as EglError, }; +#[cfg(feature = "wayland_frontend")] +use crate::{ + backend::allocator::{dmabuf::Dmabuf, Format}, + utils::Buffer, +}; #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] /// Possible transformations to two-dimensional planes