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 to 2021 edition & inline formats #125

Merged
merged 1 commit into from
Aug 1, 2022
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 bb8/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.8.0"
description = "Full-featured async (tokio-based) connection pool (like r2d2)"
license = "MIT"
repository = "https://github.com/djc/bb8"
edition = "2018"
edition = "2021"
workspace = ".."
readme = "../README.md"

Expand Down
2 changes: 1 addition & 1 deletion bb8/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ where
{
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match *self {
RunError::User(ref err) => write!(f, "{}", err),
RunError::User(ref err) => write!(f, "{err}"),
RunError::TimedOut => write!(f, "Timed out in bb8"),
}
}
Expand Down
2 changes: 1 addition & 1 deletion postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.8.1"
description = "Full-featured async (tokio-based) postgres connection pool (like r2d2)"
license = "MIT"
repository = "https://github.com/djc/bb8"
edition = "2018"
edition = "2021"

[features]
"with-bit-vec-0_6" = ["tokio-postgres/with-bit-vec-0_6"]
Expand Down
6 changes: 3 additions & 3 deletions postgres/examples/hyper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async fn main() {

let pool = match Pool::builder().build(pg_mgr).await {
Ok(pool) => pool,
Err(e) => panic!("bb8 error {}", e),
Err(e) => panic!("bb8 error {e}"),
};

let _ = Server::bind(&addr)
Expand All @@ -40,7 +40,7 @@ async fn main() {
}
Err(e) => {
println!("Sending error response");
Response::new(Body::from(format!("Internal error {:?}", e)))
Response::new(Body::from(format!("Internal error {e:?}")))
}
})
}
Expand All @@ -57,5 +57,5 @@ async fn handler(
let stmt = conn.prepare("SELECT 1").await?;
let row = conn.query_one(&stmt, &[]).await?;
let v = row.get::<usize, i32>(0);
Ok(Response::new(Body::from(format!("Got results {:?}", v))))
Ok(Response::new(Body::from(format!("Got results {v:?}"))))
}
2 changes: 1 addition & 1 deletion postgres/examples/static_select.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn main() {

let pool = match Pool::builder().build(pg_mgr).await {
Ok(pool) => pool,
Err(e) => panic!("builder error: {:?}", e),
Err(e) => panic!("builder error: {e:?}"),
};

let connection = pool.get().await.unwrap();
Expand Down
2 changes: 1 addition & 1 deletion redis/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version = "0.11.0"
description = "Full-featured async (tokio-based) redis connection pool (like r2d2)"
license = "MIT"
repository = "https://github.com/djc/bb8"
edition = "2018"
edition = "2021"

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