From 7e6a449f276cd85ebd9201ef1a62aff3bc4d1595 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Fri, 10 Nov 2017 22:53:08 -0800 Subject: Update hid crate to 0.4.1 Import subrepo hid/:hid at 6dc63c8682bd2f027c0d3b4a004b097ca9ac49fa --- hid/Cargo.toml | 2 +- hid/src/handle.rs | 3 ++- hid/src/lib.rs | 2 +- nitrocli/Cargo.lock | 4 ++-- nitrocli/Cargo.toml | 4 ++-- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/hid/Cargo.toml b/hid/Cargo.toml index 91111a4..5e608a8 100644 --- a/hid/Cargo.toml +++ b/hid/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "hid" -version = "0.4.0" +version = "0.4.1" authors = ["meh. "] license = "WTFPL" diff --git a/hid/src/handle.rs b/hid/src/handle.rs index 759c87e..d0eb090 100644 --- a/hid/src/handle.rs +++ b/hid/src/handle.rs @@ -4,6 +4,7 @@ use libc::c_int; use sys::*; use error::{self, Error}; +/// A device handle. pub struct Handle { ptr: *mut hid_device, } @@ -131,7 +132,7 @@ impl<'a> Data<'a> { /// /// Returns the report ID and the amount of read bytes or `None` if there was a timeout. pub fn read_from>(&mut self, mut data: T, timeout: Duration) -> error::Result> { - let mut data = data.as_mut(); + let data = data.as_mut(); let mut buffer = Vec::with_capacity(data.len() + 1); if let Some(length) = self.read(&mut buffer, timeout)? { diff --git a/hid/src/lib.rs b/hid/src/lib.rs index d71b5a5..fb2ccf8 100644 --- a/hid/src/lib.rs +++ b/hid/src/lib.rs @@ -13,5 +13,5 @@ pub use devices::Devices; mod device; pub use device::Device; -mod handle; +pub mod handle; pub use handle::Handle; diff --git a/nitrocli/Cargo.lock b/nitrocli/Cargo.lock index 33d947c..67f1563 100644 --- a/nitrocli/Cargo.lock +++ b/nitrocli/Cargo.lock @@ -3,7 +3,7 @@ name = "nitrocli" version = "0.1.1" dependencies = [ "gcc 0.3.54", - "hid 0.4.0", + "hid 0.4.1", "hidapi-sys 0.1.2", "libc 0.2.30", "pkg-config 0.3.9", @@ -21,7 +21,7 @@ replace = "gcc 0.3.54" [[package]] name = "hid" -version = "0.4.0" +version = "0.4.1" dependencies = [ "hidapi-sys 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.30 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/nitrocli/Cargo.toml b/nitrocli/Cargo.toml index ac02692..f9bb4d6 100644 --- a/nitrocli/Cargo.toml +++ b/nitrocli/Cargo.toml @@ -35,7 +35,7 @@ version = "0.3.54" path = "../gcc" [dependencies.hid] -version = "0.4.0" +version = "0.4.1" path = "../hid" [dependencies.hidapi-sys] @@ -52,7 +52,7 @@ path = "../pkg-config" [replace] "gcc:0.3.54" = { path = "../gcc" } -"hid:0.4.0" = { path = "../hid" } +"hid:0.4.1" = { path = "../hid" } "hidapi-sys:0.1.2" = { path = "../hidapi-sys" } "libc:0.2.30" = { path = "../libc" } "pkg-config:0.3.9" = { path = "../pkg-config" } -- cgit v1.2.3