diff --git a/sqlx-core/src/connect.rs b/sqlx-core/src/connect.rs index adf54dc8..ce85e30e 100644 --- a/sqlx-core/src/connect.rs +++ b/sqlx-core/src/connect.rs @@ -7,6 +7,7 @@ where type Options: ConnectOptions; #[cfg(feature = "async")] + #[must_use] fn connect(url: &str) -> futures_util::future::BoxFuture<'_, crate::Result> where Self: Sized, @@ -17,6 +18,7 @@ where } #[cfg(feature = "async")] + #[must_use] fn connect_with( options: &Self::Options, ) -> futures_util::future::BoxFuture<'_, crate::Result> diff --git a/sqlx-core/src/execute.rs b/sqlx-core/src/execute.rs index 2b77778c..6965f076 100644 --- a/sqlx-core/src/execute.rs +++ b/sqlx-core/src/execute.rs @@ -79,7 +79,7 @@ impl<'q, 'a, Db: Database> Execute<'q, 'a, Db> for (&'q str, &'a Arguments<'a, D } fn arguments(&self) -> Option<&'_ Arguments<'a, Db>> { - Some(&self.1) + Some(self.1) } } @@ -89,7 +89,7 @@ impl<'q, 'a, Db: Database> Execute<'q, 'a, Db> for (&'q String, &'a Arguments<'a } fn arguments(&self) -> Option<&'_ Arguments<'a, Db>> { - Some(&self.1) + Some(self.1) } } impl<'a, Db: Database> Execute<'_, 'a, Db> for (String, &'a Arguments<'a, Db>) { @@ -98,6 +98,6 @@ impl<'a, Db: Database> Execute<'_, 'a, Db> for (String, &'a Arguments<'a, Db>) { } fn arguments(&self) -> Option<&'_ Arguments<'a, Db>> { - Some(&self.1) + Some(self.1) } } diff --git a/sqlx-core/src/executor.rs b/sqlx-core/src/executor.rs index 4f4002fc..a7982dc2 100644 --- a/sqlx-core/src/executor.rs +++ b/sqlx-core/src/executor.rs @@ -1,7 +1,7 @@ #[cfg(feature = "async")] use futures_util::future::{self, BoxFuture, FutureExt, TryFutureExt}; -use crate::{Database, Execute, Runtime}; +use crate::{Database, Runtime}; /// Describes a type that can execute SQL queries on a self-provided database connection. /// @@ -24,7 +24,7 @@ pub trait Executor { ) -> BoxFuture<'x, crate::Result<::QueryResult>> where Rt: crate::Async, - E: 'x + Execute<'q, 'a, Self::Database>, + E: 'x + crate::Execute<'q, 'a, Self::Database>, 'e: 'x, 'q: 'x, 'a: 'x; @@ -36,7 +36,7 @@ pub trait Executor { ) -> BoxFuture<'x, crate::Result::Row>>> where Rt: crate::Async, - E: 'x + Execute<'q, 'a, Self::Database>, + E: 'x + crate::Execute<'q, 'a, Self::Database>, 'e: 'x, 'q: 'x, 'a: 'x; @@ -48,7 +48,7 @@ pub trait Executor { ) -> BoxFuture<'x, crate::Result::Row>>> where Rt: crate::Async, - E: 'x + Execute<'q, 'a, Self::Database>, + E: 'x + crate::Execute<'q, 'a, Self::Database>, 'e: 'x, 'q: 'x, 'a: 'x; @@ -60,7 +60,7 @@ pub trait Executor { ) -> BoxFuture<'x, crate::Result<::Row>> where Rt: crate::Async, - E: 'x + Execute<'q, 'a, Self::Database>, + E: 'x + crate::Execute<'q, 'a, Self::Database>, 'e: 'x, 'q: 'x, 'a: 'x, @@ -84,7 +84,7 @@ impl> Executor for &'_ mut X { ) -> BoxFuture<'x, crate::Result<::QueryResult>> where Rt: crate::Async, - E: 'x + Execute<'q, 'a, Self::Database>, + E: 'x + crate::Execute<'q, 'a, Self::Database>, 'e: 'x, 'q: 'x, 'a: 'x, @@ -99,7 +99,7 @@ impl> Executor for &'_ mut X { ) -> BoxFuture<'x, crate::Result::Row>>> where Rt: crate::Async, - E: 'x + Execute<'q, 'a, Self::Database>, + E: 'x + crate::Execute<'q, 'a, Self::Database>, 'e: 'x, 'q: 'x, 'a: 'x, @@ -114,7 +114,7 @@ impl> Executor for &'_ mut X { ) -> BoxFuture<'x, crate::Result::Row>>> where Rt: crate::Async, - E: 'x + Execute<'q, 'a, Self::Database>, + E: 'x + crate::Execute<'q, 'a, Self::Database>, 'e: 'x, 'q: 'x, 'a: 'x, diff --git a/sqlx-core/src/lib.rs b/sqlx-core/src/lib.rs index 5b6ac9f7..b75234a6 100644 --- a/sqlx-core/src/lib.rs +++ b/sqlx-core/src/lib.rs @@ -16,7 +16,8 @@ #![warn(clippy::use_self)] #![warn(clippy::useless_let_if_seq)] #![allow(clippy::doc_markdown)] -#![allow(clippy::clippy::missing_errors_doc)] +#![allow(clippy::missing_errors_doc)] +#![allow(clippy::missing_panics_doc)] mod acquire; pub mod arguments; diff --git a/sqlx-core/src/row.rs b/sqlx-core/src/row.rs index 2edc9100..902f5398 100644 --- a/sqlx-core/src/row.rs +++ b/sqlx-core/src/row.rs @@ -36,7 +36,7 @@ pub trait Row: 'static + Send + Sync { T: Decode<'r, Self::Database>; /// Returns the raw representation of the value at the index. - // noinspection RsNeedlessLifetimes + #[allow(clippy::needless_lifetimes)] fn try_get_raw<'r>( &'r self, index: usize,