|
|
|
@ -5,9 +5,6 @@ use std::io;
@@ -5,9 +5,6 @@ use std::io;
|
|
|
|
|
use std::sync::mpsc; |
|
|
|
|
use nix; |
|
|
|
|
|
|
|
|
|
#[cfg(feature = "udev")] |
|
|
|
|
use udev; |
|
|
|
|
|
|
|
|
|
use libc; |
|
|
|
|
|
|
|
|
|
/// UInput error.
|
|
|
|
@ -19,10 +16,6 @@ pub enum Error {
@@ -19,10 +16,6 @@ pub enum Error {
|
|
|
|
|
/// Errors with internal nulls in names.
|
|
|
|
|
Nul(ffi::NulError), |
|
|
|
|
|
|
|
|
|
#[cfg(feature = "udev")] |
|
|
|
|
/// Errors coming from udev.
|
|
|
|
|
Udev(udev::Error), |
|
|
|
|
|
|
|
|
|
Io(io::Error), |
|
|
|
|
|
|
|
|
|
Send(mpsc::SendError<libc::input_event>), |
|
|
|
@ -46,13 +39,6 @@ impl From<nix::Error> for Error {
@@ -46,13 +39,6 @@ impl From<nix::Error> for Error {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#[cfg(feature = "udev")] |
|
|
|
|
impl From<udev::Error> for Error { |
|
|
|
|
fn from(value: udev::Error) -> Self { |
|
|
|
|
Error::Udev(value) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl From<io::Error> for Error { |
|
|
|
|
fn from(value: io::Error) -> Self { |
|
|
|
|
Error::Io(value) |
|
|
|
@ -80,10 +66,6 @@ impl error::Error for Error {
@@ -80,10 +66,6 @@ impl error::Error for Error {
|
|
|
|
|
&Error::Nul(ref err) => |
|
|
|
|
err.description(), |
|
|
|
|
|
|
|
|
|
#[cfg(feature = "udev")] |
|
|
|
|
&Error::Udev(ref err) => |
|
|
|
|
err.description(), |
|
|
|
|
|
|
|
|
|
&Error::Io(ref err) => |
|
|
|
|
err.description(), |
|
|
|
|
|
|
|
|
|