Skip to content

Commit 8af9456

Browse files
authored
Merge pull request #343 from paolobarbolini/bump
Release `mysql_async` v0.36.0
2 parents 1176315 + 2c347b0 commit 8af9456

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0"
77
name = "mysql_async"
88
readme = "README.md"
99
repository = "https://github.com/blackbeam/mysql_async"
10-
version = "0.35.1"
10+
version = "0.36.0"
1111
exclude = ["test/*"]
1212
edition = "2021"
1313
categories = ["asynchronous", "database"]
@@ -21,7 +21,7 @@ futures-util = "0.3"
2121
futures-sink = "0.3"
2222
keyed_priority_queue = "0.4"
2323
lru = "0.14.0"
24-
mysql_common = { version = "0.35", default-features = false }
24+
mysql_common = { version = "0.35.3", default-features = false }
2525
pem = "3.0"
2626
percent-encoding = "2.1.0"
2727
rand = "0.9"

src/conn/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,7 @@ mod test {
16461646

16471647
fn random_pass() -> String {
16481648
let mut rng = rand::rng();
1649-
let pass: [u8; 10] = rng.gen();
1649+
let pass: [u8; 10] = rng.random();
16501650

16511651
IntoIterator::into_iter(pass)
16521652
.map(|x| ((x % (123 - 97)) + 97) as char)

src/opts/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ pub const DEFAULT_POOL_CONSTRAINTS: PoolConstraints = PoolConstraints { min: 10,
4343
//
4444
const_assert!(
4545
_DEFAULT_POOL_CONSTRAINTS_ARE_CORRECT,
46-
DEFAULT_POOL_CONSTRAINTS.min <= DEFAULT_POOL_CONSTRAINTS.max,
46+
DEFAULT_POOL_CONSTRAINTS.min <= DEFAULT_POOL_CONSTRAINTS.max
47+
&& 0 < DEFAULT_POOL_CONSTRAINTS.max,
4748
);
4849

4950
/// Each connection will cache up to this number of statements by default.
@@ -1210,8 +1211,8 @@ impl PoolConstraints {
12101211
/// assert_eq!(opts.pool_opts().constraints(), PoolConstraints::new(0, 151).unwrap());
12111212
/// # Ok(()) }
12121213
/// ```
1213-
pub fn new(min: usize, max: usize) -> Option<PoolConstraints> {
1214-
if min <= max {
1214+
pub const fn new(min: usize, max: usize) -> Option<PoolConstraints> {
1215+
if min <= max && max > 0 {
12151216
Some(PoolConstraints { min, max })
12161217
} else {
12171218
None

0 commit comments

Comments
 (0)