mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-01-19 23:26:32 +00:00
style: clippy
This commit is contained in:
parent
aa0b795fd3
commit
7144ebc8a0
@ -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>;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user