Fix warnings
This commit is contained in:
parent
e5e7332952
commit
13c09cf350
2 changed files with 2 additions and 4 deletions
|
@ -50,7 +50,6 @@ use std::path::Path;
|
||||||
use std::ffi::{CString, CStr};
|
use std::ffi::{CString, CStr};
|
||||||
use std::mem::{size_of, transmute};
|
use std::mem::{size_of, transmute};
|
||||||
use fixedbitset::FixedBitSet;
|
use fixedbitset::FixedBitSet;
|
||||||
use num::traits::WrappingSub;
|
|
||||||
|
|
||||||
use nix::Error;
|
use nix::Error;
|
||||||
|
|
||||||
|
@ -680,7 +679,7 @@ impl Device {
|
||||||
pub fn open(path: &AsRef<Path>) -> Result<Device, Error> {
|
pub fn open(path: &AsRef<Path>) -> Result<Device, Error> {
|
||||||
let cstr = match CString::new(path.as_ref().as_os_str().as_bytes()) {
|
let cstr = match CString::new(path.as_ref().as_os_str().as_bytes()) {
|
||||||
Ok(s) => s,
|
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
|
// FIXME: only need for writing is for setting LED values. re-evaluate always using RDWR
|
||||||
// later.
|
// later.
|
||||||
|
@ -919,7 +918,7 @@ impl Device {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn fill_events(&mut self) -> Result<(), Error> {
|
fn fill_events(&mut self) -> Result<(), Error> {
|
||||||
let mut buf = &mut self.pending_events;
|
let buf = &mut self.pending_events;
|
||||||
loop {
|
loop {
|
||||||
buf.reserve(20);
|
buf.reserve(20);
|
||||||
let pre_len = buf.len();
|
let pre_len = buf.len();
|
||||||
|
|
|
@ -168,7 +168,6 @@ impl ::std::default::Default for ff_condition_effect {
|
||||||
}
|
}
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(raw_pointer_derive)]
|
|
||||||
pub struct ff_periodic_effect {
|
pub struct ff_periodic_effect {
|
||||||
pub waveform: u16,
|
pub waveform: u16,
|
||||||
pub period: u16,
|
pub period: u16,
|
||||||
|
|
Loading…
Reference in a new issue