fn add(&mut self, bill: Bill) {
        // We need to clone the bill name, since the String type cannot be implicitly copied.
        // Without the clone, the name would get moved into the 'key' portion of the hashmap,
        // and therefore would be moved out of the bill struct.
        self.inner.insert(bill.name.clone(), bill);
    }
/// Add a new bill. If a bill with the same name exists, it is overwritten.
Add a new bill. If a bill with the same name exists, it is overwritten.
Add a new bill . If a bill with the same name exists it is overwritten .
fn add(&mut self, bill: Bill) {
        // We need to clone the bill name, since the String type cannot be implicitly copied.
        // Without the clone, the name would get moved into the 'key' portion of the hashmap,
        // and therefore would be moved out of the bill struct.
        self.inner.insert(bill.name.clone(), bill);
    }
fn add ( & mut self , bill : Bill ) { // We need to clone the bill name, since the String type cannot be implicitly copied. // Without the clone, the name would get moved into the 'key' portion of the hashmap, // and therefore would be moved out of the bill struct. self . inner . insert ( bill . name . clone ( ) , bill ) ; }
Add a new bill.
Add a new bill .
&mut self
bill
Bill