fn write_template(source: Source) {

    // Get the contents to add in data section of template.
    let data = get_tip_data(source);

    // Write the template and the data to temporary file.
    let mut template = TIP.template.to_string();
    template.insert_str(TIP.template.len(), &data);
    crate::helpers::write_to_file(&CONFIG.tmp_file, &template);
}
// Function to write down the template to the temporary file specified
// in config.
Function to write down the template to the temporary file specified
in config.
Function to write down the template to the temporary file specified in config .
fn write_template(source: Source) {
    // Get the contents to add in data section of template.
    let data = get_tip_data(source);
    // Write the template and the data to temporary file.
    let mut template = TIP.template.to_string();
    template.insert_str(TIP.template.len(), &data);
    crate::helpers::write_to_file(&CONFIG.tmp_file, &template);
}
fn write_template ( source : Source ) { // Get the contents to add in data section of template. let data = get_tip_data ( source ) ; // Write the template and the data to temporary file. let mut template = TIP . template . to_string ( ) ; template . insert_str ( TIP . template . len ( ) , & data ) ; crate :: helpers :: write_to_file ( & CONFIG . tmp_file , & template ) ; }
Function to write down the template to the temporary file specified
in config.
Function to write down the template to the temporary file specified in config .
source
Source
source
Source