Skip to content

Commit

Permalink
Merge pull request #62 from waywardmonkeys/update-rand
Browse files Browse the repository at this point in the history
Update to `rand` 0.9 for example
  • Loading branch information
BeastLe9enD authored Feb 11, 2025
2 parents 7a2ed7b + ae01c32 commit 487fa1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions examples/demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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<usize> = (0..face_count).collect();
let mut rng = thread_rng();
let mut rng = rand::rng();
faces.shuffle(&mut rng);

let mut result: Vec<u32> = Vec::with_capacity(mesh.indices.len());
Expand Down

0 comments on commit 487fa1d

Please sign in to comment.