fn update_data(tip: &crate::tip::Tip, data: &str) -> bool {

    // Compare data in updated Tip with data stored and only if it differ
    // write the new data to file, replacing old data.
    if data != tip.get_data() {
        crate::helpers::write_to_file(
            &format!("{}/{}", &CONFIG.data, &tip.data),
            &data);
        true
    } else {
        false
    }
}
// Write Tip data to file if it differ
Write Tip data to file if it differ
Write Tip data to file if it differ
fn update_data(tip: &crate::tip::Tip, data: &str) -> bool {
    // Compare data in updated Tip with data stored and only if it differ
    // write the new data to file, replacing old data.
    if data != tip.get_data() {
        crate::helpers::write_to_file(
            &format!("{}/{}", &CONFIG.data, &tip.data),
            &data);
        true
    } else {
        false
    }
}
fn update_data ( tip : & crate :: tip :: Tip , data : & str ) -> bool { // Compare data in updated Tip with data stored and only if it differ // write the new data to file, replacing old data. if data != tip . get_data ( ) { crate :: helpers :: write_to_file ( & format ! ( " " CONFIG data tip data ) , & data ) ; true } else { false } }
Write Tip data to file if it differ
Write Tip data to file if it differ
tip
&crate::tip::Tip
data
&str
tip
&crate::tip::Tip
data
&str