From 5f59ded3f0820f23d31aff1dff465d581954d55a Mon Sep 17 00:00:00 2001 From: Drakulix Date: Thu, 7 Dec 2017 15:20:33 +0100 Subject: [PATCH] Fix udev example --- examples/udev.rs | 4 ++-- src/backend/udev.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/udev.rs b/examples/udev.rs index 0bee0a6..accbb0b 100644 --- a/examples/udev.rs +++ b/examples/udev.rs @@ -4,7 +4,7 @@ extern crate glium; extern crate rand; extern crate input as libinput; extern crate image; -extern crate libudev; +extern crate udev; #[macro_use(define_roles)] extern crate smithay; extern crate xkbcommon; @@ -201,7 +201,7 @@ fn main() { /* * Initialize the udev backend */ - let context = libudev::Context::new().unwrap(); + let context = udev::Context::new().unwrap(); let bytes = include_bytes!("resources/cursor2.rgba"); let udev_token = UdevBackend::new(&mut event_loop, &context, session.clone(), UdevHandlerImpl { diff --git a/src/backend/udev.rs b/src/backend/udev.rs index 23f6eb5..66fb0e3 100644 --- a/src/backend/udev.rs +++ b/src/backend/udev.rs @@ -147,7 +147,7 @@ impl + Borrow + 'static, H: DrmHandler + 'sta /// Make sure not to borrow any tokens twice. pub fn close<'a, ST: Into>>(mut self, state: ST) { let mut state = state.into(); - for (_, (mut device, event_source)) in self.devices.drain() { + for (_, (device, event_source)) in self.devices.drain() { event_source.remove(); self.handler.device_removed(&mut state, &device); let device = state.remove(device);