Skip to content

Commit de647bb

Browse files
committed
fix: compilation error, warnings
1 parent e33d23e commit de647bb

File tree

3 files changed

+6
-11
lines changed

3 files changed

+6
-11
lines changed

sqlx-core/src/pool/connect.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
use crate::connection::{ConnectOptions, Connection};
22
use crate::database::Database;
3-
use crate::pool::connection::{Floating, Live};
3+
use crate::pool::connection::Floating;
44
use crate::pool::inner::PoolInner;
55
use crate::pool::PoolConnection;
66
use crate::rt::JoinHandle;
77
use crate::Error;
88
use ease_off::EaseOff;
9-
use event_listener::{Event, EventListener};
9+
use event_listener::Event;
1010
use std::fmt::{Display, Formatter};
1111
use std::future::Future;
12-
use std::pin::Pin;
1312
use std::ptr;
1413
use std::sync::atomic::{AtomicUsize, Ordering};
15-
use std::sync::{Arc, RwLock};
16-
use std::task::{Context, Poll};
17-
use std::time::{Duration, Instant};
18-
use tracing::Instrument;
14+
use std::sync::Arc;
15+
use std::time::Instant;
1916

2017
use std::io;
2118

@@ -74,7 +71,7 @@ use std::io;
7471
/// `set_connect_options` and `get_connect_options` were removed in 0.9.0 because they complicated
7572
/// the pool internals. They can be reimplemented by capturing a mutex, or similar, in the callback.
7673
///
77-
/// This example uses Postgres and [`tokio::sync::Mutex`] but may be adapted to any driver
74+
/// This example uses Postgres and [`tokio::sync::RwLock`] but may be adapted to any driver
7875
/// or `async-std`, respectively.
7976
///
8077
/// ```rust,no_run

sqlx-core/src/pool/connection.rs

-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ use std::ops::{Deref, DerefMut};
33
use std::sync::Arc;
44
use std::time::{Duration, Instant};
55

6-
use crate::sync::AsyncSemaphoreReleaser;
7-
86
use crate::connection::Connection;
97
use crate::database::Database;
108
use crate::error::Error;

sqlx-core/src/rt/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub async fn timeout_at<F: Future>(deadline: Instant, f: F) -> Result<F::Output,
6262
}
6363

6464
#[cfg(not(feature = "_rt-async-std"))]
65-
missing_rt((duration, f))
65+
missing_rt((deadline, f))
6666
}
6767

6868
pub async fn sleep(duration: Duration) {

0 commit comments

Comments
 (0)