fn take_transaction(&mut self, trans_id: TransactionId) -> Option<Transaction> {
            let transaction = self.transactions.get(&trans_id);
            if transaction.is_some() {
                self.transactions.remove(&trans_id);
                let pos = self
                    .transaction_list
                    .transactions
                    .iter()
                    .position(|t| t == &trans_id)
                    .expect("The transaction exists hence it must also be in the list.");
                self.transaction_list.transactions.swap_remove(pos);
                for owner in self.owners.iter() {
                    self.confirmations.remove(&(trans_id, *owner));
                }
                self.confirmation_count.remove(&trans_id);
            }
            transaction
        }
/// Remove the transaction identified by `trans_id` from `self.transactions`.
/// Also removes all confirmation state associated with it.
Remove the transaction identified by `trans_id` from `self.transactions`.
Also removes all confirmation state associated with it.
Remove the transaction identified by ` trans_id ` from ` self . transactions ` . Also removes all confirmation state associated with it .
fn take_transaction(&mut self, trans_id: TransactionId) -> Option<Transaction> {
            let transaction = self.transactions.get(&trans_id);
            if transaction.is_some() {
                self.transactions.remove(&trans_id);
                let pos = self
                    .transaction_list
                    .transactions
                    .iter()
                    .position(|t| t == &trans_id)
                    .expect("The transaction exists hence it must also be in the list.");
                self.transaction_list.transactions.swap_remove(pos);
                for owner in self.owners.iter() {
                    self.confirmations.remove(&(trans_id, *owner));
                }
                self.confirmation_count.remove(&trans_id);
            }
            transaction
        }
fn take_transaction ( & mut self , trans_id : TransactionId ) -> Option < Transaction > { let transaction = self . transactions . get ( & trans_id ) ; if transaction . is_some ( ) { self . transactions . remove ( & trans_id ) ; let pos = self . transaction_list . transactions . iter ( ) . position ( | t | t == & trans_id ) . expect ( " " ) ; self . transaction_list . transactions . swap_remove ( pos ) ; for owner in self . owners . iter ( ) { self . confirmations . remove ( & ( trans_id , * owner ) ) ; } self . confirmation_count . remove ( & trans_id ) ; } transaction }
Remove the transaction identified by `trans_id` from `self.transactions`.
Remove the transaction identified by ` trans_id ` from ` self . transactions ` .
&mut self
trans_id
TransactionId
&mut self
trans_id
TransactionId