Pull out rest of udev code
This commit is contained in:
parent
9281922c72
commit
e02b59f55d
@ -8,9 +8,6 @@ use uinput_sys::*;
|
||||
use crate::{Result as Res, Device};
|
||||
use std::collections::hash_map::Values;
|
||||
|
||||
#[cfg(feature = "udev")]
|
||||
use udev;
|
||||
|
||||
/// Device builder.
|
||||
pub struct Builder {
|
||||
fd: c_int,
|
||||
|
18
src/error.rs
18
src/error.rs
@ -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 {
|
||||
/// 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 {
|
||||
}
|
||||
}
|
||||
|
||||
#[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 {
|
||||
&Error::Nul(ref err) =>
|
||||
err.description(),
|
||||
|
||||
#[cfg(feature = "udev")]
|
||||
&Error::Udev(ref err) =>
|
||||
err.description(),
|
||||
|
||||
&Error::Io(ref err) =>
|
||||
err.description(),
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user