fn print_games(games: Vec<Option<Game>>, use_colors: bool) {
    match games.len() {
        0 => println!("No games today."),
        _ => {
            games.into_iter().for_each(|game| match game {
                Some(game) => print_game(&game, use_colors),
                None => (),
            });
        }
    }
}
/// Handler function to print multiple Games
Handler function to print multiple Games
Handler function to print multiple Games
fn print_games(games: Vec<Option<Game>>, use_colors: bool) {
    match games.len() {
        0 => println!("No games today."),
        _ => {
            games.into_iter().for_each(|game| match game {
                Some(game) => print_game(&game, use_colors),
                None => (),
            });
        }
    }
}
fn print_games ( games : Vec < Option < Game > > , use_colors : bool ) { match games . len ( ) { 0 => println ! ( " " ) , _ => { games . into_iter ( ) . for_each ( | game | match game { Some ( game ) => print_game ( & game , use_colors ) , None => ( ) , } ) ; } } }
Handler function to print multiple Games
Handler function to print multiple Games
games
Vec<Option<Game>>
use_colors
bool
games
Vec<Option<Game>>
use_colors
bool