Skip to content

Commit

Permalink
Merge pull request #38 from outersky/mysql-25
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede authored Jun 7, 2024
2 parents d417726 + 2925f6e commit 46cdfa0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
version:
- { name: msrv, version: 1.68.0 }
- { name: msrv, version: 1.70.0 }
- { name: stable, version: stable }
- { name: nightly, version: nightly }

Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## Unreleased

- Minimum supported Rust version (MSRV) is now 1.68 due to transitive `time` dependency.
- Update `mysql` dependency to `25`.
- Minimum supported Rust version (MSRV) is now 1.70 to align with `mysql` dependency.

## 24.0.0

Expand Down
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "r2d2_mysql"
version = "24.0.0"
version = "25.0.0"
authors = ["outersky <outersky@gmail.com>"]
license = "MIT"
description = "MySQL support for the r2d2 connection pool"
repository = "https://github.com/outersky/r2d2-mysql.git"
repository = "https://github.com/outersky/r2d2-mysql"
keywords = ["mysql", "sql", "pool", "database", "r2d2"]
edition = "2021"
rust-version = "1.68"
rust-version = "1.70"

[dependencies]
r2d2 = "0.8.9"
mysql = "24"
mysql = "25"
4 changes: 2 additions & 2 deletions src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//!
//! See [`MySqlConnectionManager`].

use mysql::{error::Error, prelude::*, Conn, Opts, OptsBuilder};
use mysql::{error::Error, Conn, Opts, OptsBuilder};

/// An [`r2d2`] connection manager for [`mysql`] connections.
#[derive(Clone, Debug)]
Expand All @@ -28,7 +28,7 @@ impl r2d2::ManageConnection for MySqlConnectionManager {
}

fn is_valid(&self, conn: &mut Conn) -> Result<(), Error> {
conn.query("SELECT version()").map(|_: Vec<String>| ())
conn.ping()
}

fn has_broken(&self, conn: &mut Conn) -> bool {
Expand Down

0 comments on commit 46cdfa0

Please sign in to comment.