fn update_bill_menu(bills: &mut Bills) {
    for bill in bills.get_all() {
        println!("{:?}", bill);
    }
    println!("Enter bill to update:");
    let name = match get_input() {
        Some(name) => name,
        None => return,
    };
    let amount = match get_bill_amount() {
        Some(amount) => amount,
        None => return,
    };
    if bills.update(&name, amount) {
        println!("updated");
    } else {
        println!("bill not found");
    }
}
/// Process for updating an existing bill. Includes accepting user
/// input and aborting if the user does not enter any data.
Process for updating an existing bill. Includes accepting user
input and aborting if the user does not enter any data.
Process for updating an existing bill . Includes accepting user input and aborting if the user does not enter any data .
fn update_bill_menu(bills: &mut Bills) {
    for bill in bills.get_all() {
        println!("{:?}", bill);
    }
    println!("Enter bill to update:");
    let name = match get_input() {
        Some(name) => name,
        None => return,
    };
    let amount = match get_bill_amount() {
        Some(amount) => amount,
        None => return,
    };
    if bills.update(&name, amount) {
        println!("updated");
    } else {
        println!("bill not found");
    }
}
fn update_bill_menu ( bills : & mut Bills ) { for bill in bills . get_all ( ) { println ! ( " " bill ) ; } println ! ( " " ) ; let name = match get_input ( ) { Some ( name ) => name , None => return , } ; let amount = match get_bill_amount ( ) { Some ( amount ) => amount , None => return , } ; if bills . update ( & name , amount ) { println ! ( " " ) ; } else { println ! ( " " ) ; } }
Process for updating an existing bill.
Process for updating an existing bill .
bills
&mut Bills