Fix some clippy warnings

This commit is contained in:
gwenn 2018-12-06 19:00:55 +01:00
parent 626118ce07
commit dc49b28520
3 changed files with 3 additions and 3 deletions

View File

@ -8,7 +8,7 @@ use std::str;
/// Enum listing possible errors from rusqlite.
#[derive(Debug)]
#[allow(enum_variant_names)]
#[allow(clippy::enum_variant_names)]
pub enum Error {
/// An error from an underlying SQLite call.
SqliteFailure(ffi::Error, Option<String>),

View File

@ -27,7 +27,7 @@ impl<'stmt> Rows<'stmt> {
/// This is a "streaming iterator". For a more natural interface,
/// consider using `query_map` or `query_and_then` instead, which
/// return types that implement `Iterator`.
#[cfg_attr(feature = "cargo-clippy", allow(should_implement_trait))] // cannot implement Iterator
#[allow(clippy::should_implement_trait)] // cannot implement Iterator
pub fn next<'a>(&'a mut self) -> Option<Result<Row<'a, 'stmt>>> {
self.stmt.and_then(|stmt| match stmt.step() {
Ok(true) => Some(Ok(Row {

View File

@ -47,7 +47,7 @@ impl Error for FromSqlError {
}
}
#[cfg_attr(feature = "clippy", allow(match_same_arms))]
#[allow(clippy::match_same_arms)]
fn cause(&self) -> Option<&Error> {
match *self {
FromSqlError::Other(ref err) => err.cause(),