Skip to content

Commit d3e6693

Browse files
committed
Edition 2024: Use r#gen instead of gen (rust-lang/rust#123904).
1 parent 793bed2 commit d3e6693

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dev/dev.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ pub fn random_vec3_snorm(rng: &mut impl Rng) -> Vec3 {
6969

7070
// 50/50 chance of returning random_vec3_snorm or random_vec3_snorm_outlier.
7171
fn random_vec3_snorm_maybe_outlier(rng: &mut impl Rng) -> Vec3 {
72-
if rng.gen::<bool>() {
72+
if rng.r#gen::<bool>() {
7373
random_vec3_snorm(rng)
7474
} else {
7575
random_vec3_snorm_outlier(rng)
@@ -120,7 +120,7 @@ fn random_quat_outlier(rng: &mut impl Rng) -> Quat {
120120

121121
// 50/50 chance of returning random_quat or random_quat_outlier.
122122
fn random_quat_maybe_outlier(rng: &mut impl Rng) -> Quat {
123-
if rng.gen::<bool>() {
123+
if rng.r#gen::<bool>() {
124124
random_quat(rng)
125125
} else {
126126
random_quat_outlier(rng)
@@ -370,15 +370,15 @@ pub fn spawn_joints(
370370
let mut joints: Vec<Entity> = Vec::with_capacity(num);
371371

372372
let root_joint = commands
373-
.spawn((Transform::IDENTITY, RandomMeshAnimation::new(rng.gen())))
373+
.spawn((Transform::IDENTITY, RandomMeshAnimation::new(rng.r#gen())))
374374
.set_parent(base)
375375
.id();
376376

377377
joints.push(root_joint);
378378

379379
for _ in 1..num {
380380
let joint = commands
381-
.spawn((Transform::IDENTITY, RandomMeshAnimation::new(rng.gen())))
381+
.spawn((Transform::IDENTITY, RandomMeshAnimation::new(rng.r#gen())))
382382
.set_parent(root_joint)
383383
.id();
384384

0 commit comments

Comments
 (0)