fn parse_games(scores: APIResponse) -> Vec<Option<Game>> {
    let games = scores.games;

    games
        .iter()
        .map(|game| parse_game(game))
        .collect::<Vec<Option<Game>>>()
}
/// Transforms a JSON structure of multiple games into
/// a vector of Option<Game> so they can be processed by
/// other parts of the application
Transforms a JSON structure of multiple games into
a vector of Option so they can be processed by
other parts of the application
Transforms a JSON structure of multiple games into a vector of Option so they can be processed by other parts of the application
fn parse_games(scores: APIResponse) -> Vec<Option<Game>> {
    let games = scores.games;
    games
        .iter()
        .map(|game| parse_game(game))
        .collect::<Vec<Option<Game>>>()
}
fn parse_games ( scores : APIResponse ) -> Vec < Option < Game > > { let games = scores . games ; games . iter ( ) . map ( | game | parse_game ( game ) ) . collect :: < Vec < Option < Game > > > ( ) }
Transforms a JSON structure of multiple games into
a vector of Option<Game> so they can be processed by
other parts of the application
Transforms a JSON structure of multiple games into a vector of Option<Game > so they can be processed by other parts of the application
scores
APIResponse
scores
APIResponse