groundwork for 0.9.0-alpha.1 (#3821)

* chore: bump version to `0.9.0-alpha.1`

* chore: delete unused `sqlx-bench` package

* chore: set `rust-version` to 1.85 for all crates

* fix: lots of new Clippy warnings

* fix: lots more Clippy warnings

* fix(cli): add `_sqlite` feature

* fix: lots, *lots* more Clippy warnings

* fix(core): warning in `tls_rustls`

* breaking: delete runtime+TLS combination features

* chore: don't re-export unstable `TransactionManager` trait

* chore: 0.9.0-alplha.1 CHANGELOG

* chore: increase MSRV further to 1.86

* fix: more clippy warnings
This commit is contained in:
Austin Bonander
2025-06-01 21:09:55 -07:00
committed by GitHub
parent bab1b022bd
commit 90797200ee
94 changed files with 213 additions and 1265 deletions

View File

@@ -9,7 +9,7 @@ use crate::error::Error;
use crate::executor::{Execute, Executor};
use crate::pool::Pool;
impl<'p, DB: Database> Executor<'p> for &'_ Pool<DB>
impl<DB: Database> Executor<'_> for &'_ Pool<DB>
where
for<'c> &'c mut DB::Connection: Executor<'c, Database = DB>,
{

View File

@@ -94,7 +94,7 @@ impl<DB: Database> PoolInner<DB> {
self.on_closed.notify(usize::MAX);
}
pub(super) fn close<'a>(self: &'a Arc<Self>) -> impl Future<Output = ()> + 'a {
pub(super) fn close(self: &Arc<Self>) -> impl Future<Output = ()> + '_ {
self.mark_closed();
async move {
@@ -124,7 +124,7 @@ impl<DB: Database> PoolInner<DB> {
///
/// If we steal a permit from the parent but *don't* open a connection,
/// it should be returned to the parent.
async fn acquire_permit<'a>(self: &'a Arc<Self>) -> Result<AsyncSemaphoreReleaser<'a>, Error> {
async fn acquire_permit(self: &Arc<Self>) -> Result<AsyncSemaphoreReleaser<'_>, Error> {
let parent = self
.parent()
// If we're already at the max size, we shouldn't try to steal from the parent.
@@ -452,14 +452,14 @@ pub(super) fn is_beyond_max_lifetime<DB: Database>(
) -> bool {
options
.max_lifetime
.map_or(false, |max| live.created_at.elapsed() > max)
.is_some_and(|max| live.created_at.elapsed() > max)
}
/// Returns `true` if the connection has exceeded `options.idle_timeout` if set, `false` otherwise.
fn is_beyond_idle_timeout<DB: Database>(idle: &Idle<DB>, options: &PoolOptions<DB>) -> bool {
options
.idle_timeout
.map_or(false, |timeout| idle.idle_since.elapsed() > timeout)
.is_some_and(|timeout| idle.idle_since.elapsed() > timeout)
}
async fn check_idle_conn<DB: Database>(

View File

@@ -8,7 +8,7 @@ pub enum MaybePoolConnection<'c, DB: Database> {
PoolConnection(PoolConnection<DB>),
}
impl<'c, DB: Database> Deref for MaybePoolConnection<'c, DB> {
impl<DB: Database> Deref for MaybePoolConnection<'_, DB> {
type Target = DB::Connection;
#[inline]
@@ -20,7 +20,7 @@ impl<'c, DB: Database> Deref for MaybePoolConnection<'c, DB> {
}
}
impl<'c, DB: Database> DerefMut for MaybePoolConnection<'c, DB> {
impl<DB: Database> DerefMut for MaybePoolConnection<'_, DB> {
#[inline]
fn deref_mut(&mut self) -> &mut Self::Target {
match self {
@@ -30,7 +30,7 @@ impl<'c, DB: Database> DerefMut for MaybePoolConnection<'c, DB> {
}
}
impl<'c, DB: Database> From<PoolConnection<DB>> for MaybePoolConnection<'c, DB> {
impl<DB: Database> From<PoolConnection<DB>> for MaybePoolConnection<'_, DB> {
fn from(v: PoolConnection<DB>) -> Self {
MaybePoolConnection::PoolConnection(v)
}