From 13c09cf350dde38c0bcee8a7b3cfd66447abe5b0 Mon Sep 17 00:00:00 2001 From: Greg V Date: Fri, 1 Dec 2017 23:06:03 +0300 Subject: [PATCH] Fix warnings --- src/lib.rs | 5 ++--- src/raw.rs | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a6e28fe..40742a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -50,7 +50,6 @@ use std::path::Path; use std::ffi::{CString, CStr}; use std::mem::{size_of, transmute}; use fixedbitset::FixedBitSet; -use num::traits::WrappingSub; use nix::Error; @@ -680,7 +679,7 @@ impl Device { pub fn open(path: &AsRef) -> Result { let cstr = match CString::new(path.as_ref().as_os_str().as_bytes()) { Ok(s) => s, - Err(e) => return Err(Error::InvalidPath), + Err(_) => return Err(Error::InvalidPath), }; // FIXME: only need for writing is for setting LED values. re-evaluate always using RDWR // later. @@ -919,7 +918,7 @@ impl Device { } fn fill_events(&mut self) -> Result<(), Error> { - let mut buf = &mut self.pending_events; + let buf = &mut self.pending_events; loop { buf.reserve(20); let pre_len = buf.len(); diff --git a/src/raw.rs b/src/raw.rs index 344b3c3..e504205 100644 --- a/src/raw.rs +++ b/src/raw.rs @@ -168,7 +168,6 @@ impl ::std::default::Default for ff_condition_effect { } #[repr(C)] #[derive(Copy, Clone, Debug)] -#[allow(raw_pointer_derive)] pub struct ff_periodic_effect { pub waveform: u16, pub period: u16,