fn color_generator() -> String {
    let colors = ["white","black","silver","gray","red","blue","brown","beige","yellow","green"];
    let (min, max) = (0, colors.len());

    let mut rng = rand::thread_rng();

    colors[rng.gen_range(min, max)].to_string()
}
/// rand crate has no feature to select an element randomly in array as opposed to random module in Python.
/// So creating a function to select a color is much more clear.
rand crate has no feature to select an element randomly in array as opposed to random module in Python.
So creating a function to select a color is much more clear.
rand crate has no feature to select an element randomly in array as opposed to random module in Python . So creating a function to select a color is much more clear .
fn color_generator() -> String {
    let colors = ["white","black","silver","gray","red","blue","brown","beige","yellow","green"];
    let (min, max) = (0, colors.len());
    let mut rng = rand::thread_rng();
    colors[rng.gen_range(min, max)].to_string()
}
fn color_generator ( ) -> String { let colors = [ " " , " " , " " , " " , " " , " " , " " , " " , " " , " " ] ; let ( min , max ) = ( 0 , colors . len ( ) ) ; let mut rng = rand :: thread_rng ( ) ; colors [ rng . gen_range ( min , max ) ] . to_string ( ) }
rand crate has no feature to select an element randomly in array as opposed to random module in Python.
rand crate has no feature to select an element randomly in array as opposed to random module in Python .