Fix clippy warnings

This commit is contained in:
gwenn 2016-08-08 15:23:55 +02:00
parent bf8c495b69
commit b10c52f32f
4 changed files with 3 additions and 4 deletions

View File

@ -11,6 +11,7 @@ pub type SqliteError = Error;
/// Enum listing possible errors from rusqlite. /// Enum listing possible errors from rusqlite.
#[derive(Debug)] #[derive(Debug)]
#[allow(enum_variant_names)]
pub enum Error { pub enum Error {
/// An error from an underlying SQLite call. /// An error from an underlying SQLite call.
SqliteFailure(ffi::Error, Option<String>), SqliteFailure(ffi::Error, Option<String>),
@ -140,7 +141,6 @@ impl error::Error for Error {
} }
} }
#[cfg_attr(feature="clippy", allow(match_same_arms))]
fn cause(&self) -> Option<&error::Error> { fn cause(&self) -> Option<&error::Error> {
match *self { match *self {
Error::SqliteFailure(ref err, _) => Some(err), Error::SqliteFailure(ref err, _) => Some(err),

View File

@ -50,6 +50,7 @@
//! } //! }
//! } //! }
//! ``` //! ```
#![allow(unknown_lints)]
extern crate libc; extern crate libc;
extern crate libsqlite3_sys as ffi; extern crate libsqlite3_sys as ffi;
@ -975,6 +976,7 @@ pub struct Rows<'stmt> {
stmt: Option<&'stmt Statement<'stmt>>, stmt: Option<&'stmt Statement<'stmt>>,
} }
#[allow(should_implement_trait)]
impl<'stmt> Rows<'stmt> { impl<'stmt> Rows<'stmt> {
fn new(stmt: &'stmt Statement<'stmt>) -> Rows<'stmt> { fn new(stmt: &'stmt Statement<'stmt>) -> Rows<'stmt> {
Rows { stmt: Some(stmt) } Rows { stmt: Some(stmt) }

View File

@ -401,7 +401,6 @@ impl Connection {
} }
#[cfg(test)] #[cfg(test)]
#[cfg_attr(feature="clippy", allow(similar_names))]
mod test { mod test {
use Connection; use Connection;
use super::DropBehavior; use super::DropBehavior;

View File

@ -103,7 +103,6 @@ pub enum Value {
} }
#[cfg(test)] #[cfg(test)]
#[cfg_attr(feature="clippy", allow(similar_names))]
mod test { mod test {
extern crate time; extern crate time;
@ -182,7 +181,6 @@ mod test {
} }
#[test] #[test]
#[cfg_attr(feature="clippy", allow(cyclomatic_complexity))]
fn test_mismatched_types() { fn test_mismatched_types() {
fn is_invalid_column_type(err: Error) -> bool { fn is_invalid_column_type(err: Error) -> bool {
match err { match err {