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
98 changes: 60 additions & 38 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ indoc = "2"
libc = "0.2.42"
memmem = "0.1.1"
num_enum = "0.7"
rand = "0.8"
rand = "0.9"
regex-automata = { version = "0.4.9" }
serde = { version = "1.0.113", features = [ "derive" ] }
serde_json = "1.0.56"
Expand Down
8 changes: 4 additions & 4 deletions engine/src/ast/field_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ impl Expr for ComparisonExpr {

#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
if *USE_AVX2 {
use rand::{Rng, thread_rng};
use rand::{Rng, rng};
use sliceslice::x86::*;

fn slice_to_array<const N: usize>(slice: &[u8]) -> [u8; N] {
Expand All @@ -501,7 +501,7 @@ impl Expr for ComparisonExpr {
array
}

let position = thread_rng().gen_range(1..bytes.len());
let position = rng().random_range(1..bytes.len());
return unsafe {
match bytes.len() {
2 => search!(Avx2Searcher::with_position(
Expand Down Expand Up @@ -570,10 +570,10 @@ impl Expr for ComparisonExpr {
}
#[cfg(target_arch = "wasm32")]
if *USE_SIMD128 {
use rand::{Rng, thread_rng};
use rand::{Rng, rng};
use sliceslice::wasm32::*;

let position = thread_rng().gen_range(1..bytes.len());
let position = rng().random_range(1..bytes.len());

return unsafe { search!(Wasm32Searcher::with_position(bytes, position)) };
}
Expand Down
4 changes: 2 additions & 2 deletions wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ crate-type = ["cdylib"]
doctest = false

[dependencies]
getrandom = { version = "0.2", features = ["js"] }
js-sys = "0.3.41"
getrandom = { version = "0.3", features = ["wasm_js"] }
js-sys = "0.3.77"
serde-wasm-bindgen = "0.5.0"
wasm-bindgen = { version = "0.2", features = ["serde-serialize"] }
wirefilter.workspace = true