Skip to content
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
286 changes: 252 additions & 34 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/base32-simd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ outref = "0.5.1"
vsimd = { path = "../vsimd", version = "0.9.0-dev" }

[dev-dependencies]
rand = "0.8.5"
rand = "0.10"

[target.'cfg(target_arch="wasm32")'.dev-dependencies]
getrandom = { version = "0.2.8", features = ["js"] }
getrandom = { version = "0.4.2", features = ["wasm_js"] }
wasm-bindgen-test = "0.3.34"
5 changes: 3 additions & 2 deletions crates/base32-simd/tests/it.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
use base32_simd::{AsOut, Base32};
use base32_simd::{BASE32, BASE32HEX, BASE32HEX_NO_PAD, BASE32_NO_PAD};

use rand::Rng;

fn rand_bytes(n: usize) -> Vec<u8> {
use rand::RngCore;
let mut bytes = vec![0u8; n];
rand::thread_rng().fill_bytes(&mut bytes);
rand::rng().fill_bytes(&mut bytes);
bytes
}

Expand Down
4 changes: 2 additions & 2 deletions crates/base64-simd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ rayon = { version = "1.6.1", optional = true }

[dev-dependencies]
base64 = "0.22.0"
rand = "0.8.5"
rand = "0.10"
const-str = "0.6"

[target.'cfg(target_arch="wasm32")'.dev-dependencies]
getrandom = { version = "0.2.8", features = ["js"] }
getrandom = { version = "0.4.2", features = ["wasm_js"] }
wasm-bindgen-test = "0.3.34"
10 changes: 5 additions & 5 deletions crates/base64-simd/tests/it.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
use base64_simd::{AsOut, Base64};
use base64_simd::{STANDARD, STANDARD_NO_PAD, URL_SAFE, URL_SAFE_NO_PAD};

#[allow(unused_imports)]
use rand::{Rng, RngExt};

fn rand_bytes(n: usize) -> Vec<u8> {
use rand::RngCore;
let mut bytes = vec![0u8; n];
rand::thread_rng().fill_bytes(&mut bytes);
rand::rng().fill_bytes(&mut bytes);
bytes
}

Expand Down Expand Up @@ -232,10 +234,8 @@ fn precise_decoded_length() {

{
// See <https://github.com/marshallpierce/rust-base64/issues/212>
use rand::Rng;

let base64 = base64_simd::STANDARD_NO_PAD;
let data = rand::thread_rng().gen::<[u8; 32]>();
let data = rand::rng().random::<[u8; 32]>();
let encoded = base64.encode_to_string(data);

let buf: &mut [u8] = &mut [0; 32];
Expand Down
4 changes: 2 additions & 2 deletions crates/hex-simd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ outref = "0.5.1"
vsimd = { path = "../vsimd", version = "0.9.0-dev" }

[dev-dependencies]
rand = "0.8.5"
rand = "0.10"

[target.'cfg(target_arch="wasm32")'.dev-dependencies]
getrandom = { version = "0.2.8", features = ["js"] }
getrandom = { version = "0.4.2", features = ["wasm_js"] }
wasm-bindgen-test = "0.3.34"
5 changes: 3 additions & 2 deletions crates/hex-simd/tests/it.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ use hex_simd::{AsOut, AsciiCase};

use core::mem::MaybeUninit;

use rand::Rng;

fn rand_bytes(n: usize) -> Vec<u8> {
use rand::RngCore;
let mut bytes = vec![0u8; n];
rand::thread_rng().fill_bytes(&mut bytes);
rand::rng().fill_bytes(&mut bytes);
bytes
}

Expand Down
4 changes: 2 additions & 2 deletions crates/unicode-simd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ outref = "0.5.1"
vsimd = { path = "../vsimd", version = "0.9.0-dev" }

[dev-dependencies]
rand = "0.8.5"
rand = "0.10"

[target.'cfg(target_arch="wasm32")'.dev-dependencies]
getrandom = { version = "0.2.8", features = ["js"] }
getrandom = { version = "0.4.2", features = ["wasm_js"] }
wasm-bindgen-test = "0.3.34"
8 changes: 4 additions & 4 deletions crates/unicode-simd/tests/it.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use std::ops::Not;

use rand::Rng;
#[allow(unused_imports)]
use rand::{Rng, RngExt};

fn rand_bytes(n: usize) -> Vec<u8> {
use rand::RngCore;
let mut bytes = vec![0u8; n];
rand::thread_rng().fill_bytes(&mut bytes);
rand::rng().fill_bytes(&mut bytes);
bytes
}

Expand All @@ -32,7 +32,7 @@ fn random() {
assert!(unicode_simd::is_ascii(&src));

if n > 0 {
let pos = rand::thread_rng().gen_range(0..n);
let pos = rand::rng().random_range(0..n);
src[pos] = 0x80;
assert!(unicode_simd::is_ascii(&src).not());
}
Expand Down
4 changes: 2 additions & 2 deletions crates/vsimd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ unstable = []

[dev-dependencies]
const-str = "0.6"
rand = "0.8.5"
rand = "0.10"

[target.'cfg(target_arch="wasm32")'.dev-dependencies]
getrandom = { version = "0.2.8", features = ["js"] }
getrandom = { version = "0.4.2", features = ["wasm_js"] }
wasm-bindgen-test = "0.3.34"