fn into_vec(mut self) -> Vec<Record> {
        // "drain" moves the records out of the hashmap, so we can then
        // move them into a vector. It also returns t (key, value) pair
        // so we need to access the value with ".1" since it is a tuple.
        let mut records: Vec<_> = self.inner.drain().map(|kv| kv.1).collect();
        // We sort the records in order by id before returning them.
        records.sort_by_key(|rec| rec.id);
        records
    }
/// Converts this structure into a vector of Record.
/// This is used when saving the data.
Converts this structure into a vector of Record.
This is used when saving the data.
Converts this structure into a vector of Record . This is used when saving the data .
fn into_vec(mut self) -> Vec<Record> {
        // "drain" moves the records out of the hashmap, so we can then
        // move them into a vector. It also returns t (key, value) pair
        // so we need to access the value with ".1" since it is a tuple.
        let mut records: Vec<_> = self.inner.drain().map(|kv| kv.1).collect();
        // We sort the records in order by id before returning them.
        records.sort_by_key(|rec| rec.id);
        records
    }
fn into_vec ( mut self ) -> Vec < Record > { // "drain" moves the records out of the hashmap, so we can then // move them into a vector. It also returns t (key, value) pair // so we need to access the value with ".1" since it is a tuple. let mut records : Vec < _ > = self . inner . drain ( ) . map ( | kv | kv . 1 ) . collect ( ) ; // We sort the records in order by id before returning them. records . sort_by_key ( | rec | rec . id ) ; records }
Converts this structure into a vector of Record.
Converts this structure into a vector of Record .
mut self