Fixed a last warning

This commit is contained in:
Dave
2025-11-25 14:17:57 +00:00
parent 3d746a8073
commit 10c0c64984

View File

@@ -6,7 +6,7 @@ use bft_json_crdt::{
}; };
use rand::{rngs::ThreadRng, seq::SliceRandom, Rng}; use rand::{rngs::ThreadRng, seq::SliceRandom, Rng};
fn random_op<T: CrdtNode>(arr: &Vec<Op<T>>, rng: &mut ThreadRng) -> OpId { fn random_op<T: CrdtNode>(arr: &[Op<T>], rng: &mut ThreadRng) -> OpId {
arr.choose(rng).map(|op| op.id).unwrap_or(ROOT_ID) arr.choose(rng).map(|op| op.id).unwrap_or(ROOT_ID)
} }