From db4587d3ec64b7e28691b43f9d9701939eed94d1 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 3 Jun 2025 20:00:18 +0200 Subject: update rust toolchain and rust dependencies. `map_many_mut` and `trait_upcasting` was stabilized. --- pixel-client/src/menu/background.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pixel-client/src/menu/background.rs') diff --git a/pixel-client/src/menu/background.rs b/pixel-client/src/menu/background.rs index 84ec3f34..13cb041d 100644 --- a/pixel-client/src/menu/background.rs +++ b/pixel-client/src/menu/background.rs @@ -23,7 +23,7 @@ use hurrycurry_protocol::{ glam::{IVec2, Vec2}, TileIndex, }; -use rand::{random, seq::IndexedRandom, thread_rng}; +use rand::{random, rng, seq::IndexedRandom}; pub struct MenuBackground { background: Vec2, @@ -54,7 +54,7 @@ impl MenuBackground { let p = Vec2::new(x as f32, y as f32); let w = (-p.length() * 0.15).exp(); let k = ((random::() * w) * BUCKETS.len() as f32) as usize; - if let Some(ti) = BUCKETS[k.min(BUCKETS.len())].choose(&mut thread_rng()) { + if let Some(ti) = BUCKETS[k.min(BUCKETS.len())].choose(&mut rng()) { map.set(IVec2::new(x, y), Some(TileIndex(*ti)), [None; 4]) } } -- cgit v1.2.3-70-g09d2