fn update(&mut self, name: &str, amount: f64) -> bool {
        // We use the get_mut() function defined on the HashMap type
        // in order to change items present within the hashmap.
        match self.inner.get_mut(name) {
            Some(bill) => {
                bill.amount = amount;
                true
            }
            None => false,
        }
    }
/// Updates an existing bill. Returns false if the bill does not exist.
Updates an existing bill. Returns false if the bill does not exist.
Updates an existing bill . Returns false if the bill does not exist .
fn update(&mut self, name: &str, amount: f64) -> bool {
        // We use the get_mut() function defined on the HashMap type
        // in order to change items present within the hashmap.
        match self.inner.get_mut(name) {
            Some(bill) => {
                bill.amount = amount;
                true
            }
            None => false,
        }
    }
fn update ( & mut self , name : & str , amount : f64 ) -> bool { // We use the get_mut() function defined on the HashMap type // in order to change items present within the hashmap. match self . inner . get_mut ( name ) { Some ( bill ) => { bill . amount = amount ; true } None => false , } }
Updates an existing bill.
Updates an existing bill .
&mut self
name
&str
amount
f64