fn generate_report(processed_data: HashMap<i64, WeeklyRecord>, output_format: &str) -> String {
    match output_format {
        "html" => generate_html_report(processed_data),
        "txt" => generate_txt_report(processed_data),
        "json" => generate_json_report(processed_data),
        _ => String::from("not sure how this could ever be hit"),
    }
}
/**
 * Generate a report as a String of the requested format
 */
Generate a report as a String of the requested format
Generate a report as a String of the requested format
fn generate_report(processed_data: HashMap<i64, WeeklyRecord>, output_format: &str) -> String {
    match output_format {
        "html" => generate_html_report(processed_data),
        "txt" => generate_txt_report(processed_data),
        "json" => generate_json_report(processed_data),
        _ => String::from("not sure how this could ever be hit"),
    }
}
fn generate_report ( processed_data : HashMap < i64 , WeeklyRecord > , output_format : & str ) -> String { match output_format { " " => generate_html_report ( processed_data ) , " " => generate_txt_report ( processed_data ) , " " => generate_json_report ( processed_data ) , _ => String :: from ( " " ) , } }
Generate a report as a String of the requested format
Generate a report as a String of the requested format
processed_data
HashMap<i64, WeeklyRecord>
output_format
&str