Explorar o código

fix rng in svg dice example (#970)

fixed the rng range so that a 6 can be rolled
Icekey %!s(int64=2) %!d(string=hai) anos
pai
achega
b4af761038
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      examples/svg.rs

+ 1 - 1
examples/svg.rs

@@ -26,7 +26,7 @@ fn app(cx: Scope) -> Element {
                     onclick: move |_| {
                         use rand::Rng;
                         let mut rng = rand::thread_rng();
-                        val.set(rng.gen_range(1..6));
+                        val.set(rng.gen_range(1..=6));
                     }
                 }
             }