fn stars(options: Options) -> impl Iterator<Item = String> {
    let Options { columns } = options;
    let mut rng = rand::thread_rng();
    repeat_with(move || {
        let take = (rng.gen::<f32>() * columns as f32).floor() as usize + columns;
        STARS
            .choose_multiple(&mut rng, take)
            .fold(String::new(), |res, line| res + line)
    })
}
/// Return an Iterator over random ascii star field text
Return an Iterator over random ascii star field text
Return an Iterator over random ascii star field text
fn stars(options: Options) -> impl Iterator<Item = String> {
    let Options { columns } = options;
    let mut rng = rand::thread_rng();
    repeat_with(move || {
        let take = (rng.gen::<f32>() * columns as f32).floor() as usize + columns;
        STARS
            .choose_multiple(&mut rng, take)
            .fold(String::new(), |res, line| res + line)
    })
}
fn stars ( options : Options ) -> impl Iterator < Item = String > { let Options { columns } = options ; let mut rng = rand :: thread_rng ( ) ; repeat_with ( move | | { let take = ( rng . gen :: < f32 > ( ) * columns as f32 ) . floor ( ) as usize + columns ; STARS . choose_multiple ( & mut rng , take ) . fold ( String :: new ( ) , | res , line | res + line ) } ) }
Return an Iterator over random ascii star field text
Return an Iterator over random ascii star field text
options
Options
options
Options