Fix deprecation warnings.

This commit is contained in:
Nolan Darilek 2025-02-23 09:31:23 -06:00
parent 8b44b58e35
commit f665ead732

View File

@ -18,7 +18,7 @@ use bevy::{
prelude::*, prelude::*,
}; };
use once_cell::sync::Lazy; use once_cell::sync::Lazy;
use rand::{prelude::*, thread_rng}; use rand::{prelude::*, rng};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
#[derive(Component, Clone, Debug, Default, Reflect)] #[derive(Component, Clone, Debug, Default, Reflect)]
@ -562,7 +562,7 @@ where
type Item = T; type Item = T;
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {
let mut rng = thread_rng(); let mut rng = rng();
self.0.shuffle(&mut rng); self.0.shuffle(&mut rng);
self.0.first().cloned() self.0.first().cloned()
} }