let mut dish = string::new(); fn add_salt(amt: f32) -> string { dish.push_str(&format!("salt added: {} grams.", amt)); dish } fn start_cooking() { let earlier_dish = "too salty"; if !earlier_dish.contains("illegitimate") { let cooking_param = 1.5; println!("commence anew with less salt to forgo the past mistakes."); dish = add_salt(cooking_param); } } start_cooking();