diff --git a/sqlx-core/src/pool/connect.rs b/sqlx-core/src/pool/connect.rs index 187dab9293..592ed5a08d 100644 --- a/sqlx-core/src/pool/connect.rs +++ b/sqlx-core/src/pool/connect.rs @@ -1,21 +1,18 @@ use crate::connection::{ConnectOptions, Connection}; use crate::database::Database; -use crate::pool::connection::{Floating, Live}; +use crate::pool::connection::Floating; use crate::pool::inner::PoolInner; use crate::pool::PoolConnection; use crate::rt::JoinHandle; use crate::Error; use ease_off::EaseOff; -use event_listener::{Event, EventListener}; +use event_listener::Event; use std::fmt::{Display, Formatter}; use std::future::Future; -use std::pin::Pin; use std::ptr; use std::sync::atomic::{AtomicUsize, Ordering}; -use std::sync::{Arc, RwLock}; -use std::task::{Context, Poll}; -use std::time::{Duration, Instant}; -use tracing::Instrument; +use std::sync::Arc; +use std::time::Instant; use std::io; @@ -74,7 +71,7 @@ use std::io; /// `set_connect_options` and `get_connect_options` were removed in 0.9.0 because they complicated /// the pool internals. They can be reimplemented by capturing a mutex, or similar, in the callback. /// -/// This example uses Postgres and [`tokio::sync::Mutex`] but may be adapted to any driver +/// This example uses Postgres and [`tokio::sync::RwLock`] but may be adapted to any driver /// or `async-std`, respectively. /// /// ```rust,no_run diff --git a/sqlx-core/src/pool/connection.rs b/sqlx-core/src/pool/connection.rs index ac26437b4c..b3044de14d 100644 --- a/sqlx-core/src/pool/connection.rs +++ b/sqlx-core/src/pool/connection.rs @@ -3,8 +3,6 @@ use std::ops::{Deref, DerefMut}; use std::sync::Arc; use std::time::{Duration, Instant}; -use crate::sync::AsyncSemaphoreReleaser; - use crate::connection::Connection; use crate::database::Database; use crate::error::Error; diff --git a/sqlx-core/src/rt/mod.rs b/sqlx-core/src/rt/mod.rs index ce42dcade4..bef5e97158 100644 --- a/sqlx-core/src/rt/mod.rs +++ b/sqlx-core/src/rt/mod.rs @@ -62,7 +62,7 @@ pub async fn timeout_at(deadline: Instant, f: F) -> Result