style: clippy

This commit is contained in:
Ryan Leckey 2021-01-10 11:33:55 -08:00
parent aa0b795fd3
commit 7144ebc8a0
No known key found for this signature in database
GPG Key ID: F8AA68C235AB08C9
3 changed files with 7 additions and 5 deletions

View File

@ -3,6 +3,7 @@ use futures_util::future::BoxFuture;
use crate::{Database, Runtime};
#[allow(clippy::type_complexity)]
pub trait Acquire<Rt: Runtime> {
type Database: Database<Rt>;

View File

@ -84,11 +84,11 @@ impl Runtime for () {
type TcpStream = ();
}
// pick a default runtime
// this is so existing applications in SQLx pre 0.6 work and to
// make it more convenient, if your application only uses 1 runtime (99%+)
// most of the time you won't have to worry about picking the runtime
mod default {
// pick a default runtime
// this is so existing applications in SQLx pre 0.6 work and to
// make it more convenient, if your application only uses 1 runtime (99%+)
// most of the time you won't have to worry about picking the runtime
#[cfg(feature = "async-std")]
pub type Runtime = super::AsyncStd;
@ -146,4 +146,5 @@ mod default {
/// .connect().await?; // for Async runtimes
/// ```
///
#[allow(clippy::module_name_repetitions)]
pub type DefaultRuntime = default::Runtime;

View File

@ -116,7 +116,7 @@ where
where
for<'s> <Rt as Runtime>::TcpStream: sqlx_core::blocking::io::Stream<'s, Rt>,
{
<MySqlConnection<Rt>>::ping(self)
self.ping()
}
}