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/src/handle.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'hid/src/handle.rs') 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)? { -- cgit v1.2.1