async fn prepare_scorecard(
    req_clt: &Client,
    id: u32,
    scorecard: &mut Vec<MatchInningsInfo>,
) -> Result<(), Box<dyn std::error::Error>> {
    let resp_html = req_clt
        .get(format!(
            "{}{}",
            String::from(CRICBUZZ_MATCH_SCORECARD_API),
            id
        ))
        .send()
        .await?
        .text()
        .await?;

    parse_scorecard(&resp_html, scorecard);

    Ok(())
}
/// Helper function to parse and structure scorecard data from the HTML page
Helper function to parse and structure scorecard data from the HTML page
Helper function to parse and structure scorecard data from the HTML page
async fn prepare_scorecard(
    req_clt: &Client,
    id: u32,
    scorecard: &mut Vec<MatchInningsInfo>,
) -> Result<(), Box<dyn std::error::Error>> {
    let resp_html = req_clt
        .get(format!(
            "{}{}",
            String::from(CRICBUZZ_MATCH_SCORECARD_API),
            id
        ))
        .send()
        .await?
        .text()
        .await?;
    parse_scorecard(&resp_html, scorecard);
    Ok(())
}
async fn prepare_scorecard ( req_clt : & Client , id : u32 , scorecard : & mut Vec < MatchInningsInfo > , ) -> Result < ( ) , Box < dyn std :: error :: Error > > { let resp_html = req_clt . get ( format ! ( " " String from ( CRICBUZZ_MATCH_SCORECARD_API ) id ) ) . send ( ) . await ? . text ( ) . await ? ; parse_scorecard ( & resp_html , scorecard ) ; Ok ( ( ) ) }
Helper function to parse and structure scorecard data from the HTML page
Helper function to parse and structure scorecard data from the HTML page
req_clt
&Client
id
u32
scorecard
&mut Vec<MatchInningsInfo>
req_clt
&Client
id
u32
scorecard
&mut Vec<MatchInningsInfo>