diff --git a/examples/solar_system/Cargo.toml b/examples/solar_system/Cargo.toml index 44ced72946..327fe0aa18 100644 --- a/examples/solar_system/Cargo.toml +++ b/examples/solar_system/Cargo.toml @@ -7,4 +7,4 @@ publish = false [dependencies] iced = { path = "../..", features = ["canvas", "tokio", "debug"] } -rand = "0.7" +rand = "0.8.3" diff --git a/examples/solar_system/src/main.rs b/examples/solar_system/src/main.rs index 6a2de73692..c8f74978f5 100644 --- a/examples/solar_system/src/main.rs +++ b/examples/solar_system/src/main.rs @@ -117,15 +117,13 @@ impl State { ( Point::new( rng.gen_range( - -(width as f32) / 2.0, - width as f32 / 2.0, + (-(width as f32) / 2.0)..(width as f32 / 2.0), ), rng.gen_range( - -(height as f32) / 2.0, - height as f32 / 2.0, + (-(height as f32) / 2.0)..(height as f32 / 2.0), ), ), - rng.gen_range(0.5, 1.0), + rng.gen_range(0.5..1.0), ) }) .collect()