Skip to content

Commit

Permalink
fix: compilation error, warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
abonander committed Nov 8, 2024
1 parent e33d23e commit de647bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
13 changes: 5 additions & 8 deletions sqlx-core/src/pool/connect.rs
Original file line number Diff line number Diff line change
@@ -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;

Expand Down Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions sqlx-core/src/pool/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sqlx-core/src/rt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub async fn timeout_at<F: Future>(deadline: Instant, f: F) -> Result<F::Output,
}

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

pub async fn sleep(duration: Duration) {
Expand Down

0 comments on commit de647bb

Please sign in to comment.