change randomblob generation to use thread_rng

This commit is contained in:
pedrocarlo
2025-10-20 13:04:35 -03:00
parent baf649affb
commit a614b51ebf

View File

@@ -72,7 +72,7 @@ use super::{
CommitState, CommitState,
}; };
use parking_lot::RwLock; use parking_lot::RwLock;
use rand::{thread_rng, Rng}; use rand::{thread_rng, Rng, RngCore};
use turso_parser::ast::{self, Name, SortOrder}; use turso_parser::ast::{self, Name, SortOrder};
use turso_parser::parser::Parser; use turso_parser::parser::Parser;
@@ -8664,7 +8664,7 @@ impl Value {
.max(1) as usize; .max(1) as usize;
let mut blob: Vec<u8> = vec![0; length]; let mut blob: Vec<u8> = vec![0; length];
getrandom::getrandom(&mut blob).expect("Failed to generate random blob"); rand::thread_rng().fill_bytes(&mut blob);
Value::Blob(blob) Value::Blob(blob)
} }