From 9c7a5583b9617a2aad8fc23d63ae0b2ab70a1460 Mon Sep 17 00:00:00 2001 From: gwenn Date: Wed, 20 Jun 2018 19:07:23 +0200 Subject: [PATCH] Fix some clippy warnings * Rows cannot implement iterator * DatabaseName is passed by value => Copy ? --- src/lib.rs | 1 + src/row.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index fadfbdf..585b54f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -152,6 +152,7 @@ fn path_to_cstring(p: &Path) -> Result { } /// Name for a database within a SQLite connection. +#[derive(Copy,Clone)] pub enum DatabaseName<'a> { /// The main database. Main, diff --git a/src/row.rs b/src/row.rs index 775e69a..0e0c5d3 100644 --- a/src/row.rs +++ b/src/row.rs @@ -27,6 +27,7 @@ impl<'stmt> Rows<'stmt> { /// lifetime of the returned row is tied to the lifetime of `self`. 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 pub fn next<'a>(&'a mut self) -> Option>> { self.stmt .and_then(|stmt| match stmt.step() {