From ae01c32fdeff82f844d8b1586b9925b9cd063163 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Tue, 11 Feb 2025 23:45:40 +0700 Subject: [PATCH] Update to `rand` 0.9 for example --- Cargo.toml | 2 +- examples/demo.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a3d1444..ec37b19 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ optional = true [dev-dependencies] tobj = "4.0" miniz_oxide = "0.8" -rand = "0.8" +rand = "0.9" libc = "0.2" structopt = "0.3" memoffset = "0.9" diff --git a/examples/demo.rs b/examples/demo.rs index 0a3d261..a59004a 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -2,7 +2,7 @@ use memoffset::offset_of; use meshopt::*; -use rand::{seq::SliceRandom, thread_rng}; +use rand::seq::SliceRandom; use std::{ fmt, fs::File, @@ -365,7 +365,7 @@ fn opt_none(_: &mut Mesh) { fn opt_random_shuffle(mesh: &mut Mesh) { let face_count = mesh.indices.len() / 3; let mut faces: Vec = (0..face_count).collect(); - let mut rng = thread_rng(); + let mut rng = rand::rng(); faces.shuffle(&mut rng); let mut result: Vec = Vec::with_capacity(mesh.indices.len());