From b2b63ebfdc09eb6721dbd22f9986d7953d28b442 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 23:19:12 +0000 Subject: [PATCH 1/2] Bump fastrand from 1.9.0 to 2.1.0 Bumps [fastrand](https://github.com/smol-rs/fastrand) from 1.9.0 to 2.1.0. - [Release notes](https://github.com/smol-rs/fastrand/releases) - [Changelog](https://github.com/smol-rs/fastrand/blob/master/CHANGELOG.md) - [Commits](https://github.com/smol-rs/fastrand/compare/v1.9.0...v2.1.0) --- updated-dependencies: - dependency-name: fastrand dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 16 ++-------------- ocrs/Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ba0fd56..6cebcab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -119,12 +119,9 @@ checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" [[package]] name = "fastrand" -version = "1.9.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" -dependencies = [ - "instant", -] +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "fdeflate" @@ -219,15 +216,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "itoa" version = "1.0.10" diff --git a/ocrs/Cargo.toml b/ocrs/Cargo.toml index a03e6e1..94c97ab 100644 --- a/ocrs/Cargo.toml +++ b/ocrs/Cargo.toml @@ -22,7 +22,7 @@ thiserror = "1.0.59" wasm-bindgen = "0.2.89" [dev-dependencies] -fastrand = "1.9.0" +fastrand = "2.1.0" image = { version = "0.25.1", default-features = false, features = ["png", "jpeg", "webp"] } lexopt = "0.3.0" From fddcd89db6b00135ce7bb86e6a960dfda2f53a06 Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Fri, 3 May 2024 09:35:24 +0100 Subject: [PATCH 2/2] Adapt to fastrand v2 API change `Rng` no longer uses interior mutability. --- ocrs/src/layout_analysis.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocrs/src/layout_analysis.rs b/ocrs/src/layout_analysis.rs index 712f4b9..bb729a5 100644 --- a/ocrs/src/layout_analysis.rs +++ b/ocrs/src/layout_analysis.rs @@ -325,7 +325,7 @@ mod tests { .map(|r| RotatedRect::from_rect(r.to_f32())) .collect(); - let rng = fastrand::Rng::with_seed(1234); + let mut rng = fastrand::Rng::with_seed(1234); rng.shuffle(&mut words); let lines = find_text_lines(&words);