Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump MSRV to 1.63 for tokio 1.30 #173

Merged
merged 2 commits into from
Aug 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.60.0
toolchain: 1.63.0
override: true
- uses: actions-rs/cargo@v1
with:
Expand Down
4 changes: 2 additions & 2 deletions bb8/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "bb8"
version = "0.8.1"
edition = "2021"
rust-version = "1.63"
description = "Full-featured async (tokio-based) connection pool (like r2d2)"
license = "MIT"
repository = "https://github.com/djc/bb8"
edition = "2021"
workspace = ".."
readme = "../README.md"
rust-version = "1.60"

[dependencies]
async-trait = "0.1"
Expand Down
9 changes: 2 additions & 7 deletions bb8/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,24 +103,19 @@ pub struct Builder<M: ManageConnection> {
}

/// bb8's queue strategy when getting pool resources
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Default, Clone, Copy)]
pub enum QueueStrategy {
/// First in first out
/// This strategy behaves like a queue
/// It will evenly spread load on all existing connections, resetting their idle timeouts, maintaining the pool size
#[default]
Fifo,
/// Last in first out
/// This behaves like a stack
/// It will use the most recently used connection and help to keep the total pool size small by evicting idle connections
Lifo,
}

impl Default for QueueStrategy {
fn default() -> Self {
QueueStrategy::Fifo
}
}

impl<M: ManageConnection> Default for Builder<M> {
fn default() -> Self {
Builder {
Expand Down
4 changes: 2 additions & 2 deletions postgres/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "bb8-postgres"
version = "0.8.1"
edition = "2021"
rust-version = "1.63"
description = "Full-featured async (tokio-based) postgres connection pool (like r2d2)"
license = "MIT"
repository = "https://github.com/djc/bb8"
edition = "2021"
rust-version = "1.60"

[features]
"with-bit-vec-0_6" = ["tokio-postgres/with-bit-vec-0_6"]
Expand Down
4 changes: 2 additions & 2 deletions redis/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "bb8-redis"
version = "0.13.1"
edition = "2021"
rust-version = "1.63"
description = "Full-featured async (tokio-based) redis connection pool (like r2d2)"
license = "MIT"
repository = "https://github.com/djc/bb8"
edition = "2021"
rust-version = "1.60"

[dependencies]
async-trait = "0.1"
Expand Down