From 22bdd80b925dc9eac05863c53a017ddf29f60971 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 19 Oct 2019 10:10:17 +0200 Subject: [PATCH] Ignore `mutex_atomic` clippy lint > This lint cannot detect if the mutex is actually used for waiting before a critical section. --- src/inner_connection.rs | 3 +++ src/unlock_notify.rs | 1 + 2 files changed, 4 insertions(+) diff --git a/src/inner_connection.rs b/src/inner_connection.rs index 75b1242..fc4f4a1 100644 --- a/src/inner_connection.rs +++ b/src/inner_connection.rs @@ -37,6 +37,7 @@ pub struct InnerConnection { impl InnerConnection { #[cfg(not(feature = "hooks"))] + #[allow(clippy::mutex_atomic)] pub fn new(db: *mut ffi::sqlite3, owned: bool) -> InnerConnection { InnerConnection { db, @@ -46,6 +47,7 @@ impl InnerConnection { } #[cfg(feature = "hooks")] + #[allow(clippy::mutex_atomic)] pub fn new(db: *mut ffi::sqlite3, owned: bool) -> InnerConnection { InnerConnection { db, @@ -123,6 +125,7 @@ impl InnerConnection { } } + #[allow(clippy::mutex_atomic)] pub fn close(&mut self) -> Result<()> { if self.db.is_null() { return Ok(()); diff --git a/src/unlock_notify.rs b/src/unlock_notify.rs index 7295322..8b3d0fc 100644 --- a/src/unlock_notify.rs +++ b/src/unlock_notify.rs @@ -17,6 +17,7 @@ struct UnlockNotification { } #[cfg(feature = "unlock_notify")] +#[allow(clippy::mutex_atomic)] impl UnlockNotification { fn new() -> UnlockNotification { UnlockNotification {