From aa886ad3fbde73df07f7d0c1de11efbd51a8f41e Mon Sep 17 00:00:00 2001 From: Property404 Date: Wed, 22 Sep 2021 09:23:18 -0400 Subject: [PATCH] Remove unnecessary dependency The unmaintained dependency `libusb` is never actually used, and the Windows/FreeBSD builds don't do anything. The existance of `libusb` was causing problems with `cargo fmt --all -- --check`, due to an old version of `bitset`. A suitable replacement for the future may be `rusb`: https://github.com/a1ien/rusb --- Cargo.toml | 2 -- src/peripheral/mod.rs | 5 ----- src/peripheral/usb/mod.rs | 1 - 3 files changed, 8 deletions(-) delete mode 100644 src/peripheral/usb/mod.rs diff --git a/Cargo.toml b/Cargo.toml index 7f129c9..d499dc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,6 @@ dbus-crossroads = "^0.3.0" objc = "0.2.7" objc-foundation = "0.1.1" objc_id = "0.1.1" -[target."cfg(any(target_os = \"windows\", target_os = \"freebsd\"))".dependencies] -libusb = "0.3.0" [dev-dependencies] pretty_env_logger = "0.2" diff --git a/src/peripheral/mod.rs b/src/peripheral/mod.rs index 77b6540..ca89dbe 100644 --- a/src/peripheral/mod.rs +++ b/src/peripheral/mod.rs @@ -8,11 +8,6 @@ mod bluez; #[cfg(any(target_os = "linux", target_os = "android"))] pub use self::bluez::Peripheral; -#[cfg(any(target_os = "windows", target_os = "freebsd"))] -mod usb; -#[cfg(any(target_os = "windows", target_os = "freebsd"))] -pub use self::usb::Peripheral; - // TODO: Add struct / traits to implement for each OS // // pub enum BindingsEvent { diff --git a/src/peripheral/usb/mod.rs b/src/peripheral/usb/mod.rs deleted file mode 100644 index 2ecf261..0000000 --- a/src/peripheral/usb/mod.rs +++ /dev/null @@ -1 +0,0 @@ -use libusb;