/// The function removes the artifact download tracker if it exists in the
/// download list.
The function removes the artifact download tracker if it exists in the
download list.
The function removes the artifact download tracker if it exists in the download list .
fn remove_tracker(&mut self, integrity_hash: &CryptoHash) {
        // Remove the integrity hash from the integrity hash index.
        if let Some(tracker) = self.artifacts.remove(integrity_hash) {
            // Remove the integrity hash from the expiry entry.
            if let Some(expiry_entry) = self.expiry_index.get_mut(&tracker.expiry_instant) {
                expiry_entry
                    .retain(|expired_artifacts_hash| expired_artifacts_hash != integrity_hash);
                // remove expiry entry if no more artifacts are expiring at that instant
                if expiry_entry.is_empty() {
                    self.expiry_index.remove(&tracker.expiry_instant);
                }
            }
        }
    }
fn remove_tracker ( & mut self , integrity_hash : & CryptoHash ) { // Remove the integrity hash from the integrity hash index. if let Some ( tracker ) = self . artifacts . remove ( integrity_hash ) { // Remove the integrity hash from the expiry entry. if let Some ( expiry_entry ) = self . expiry_index . get_mut ( & tracker . expiry_instant ) { expiry_entry . retain ( | expired_artifacts_hash | expired_artifacts_hash != integrity_hash ) ; // remove expiry entry if no more artifacts are expiring at that instant if expiry_entry . is_empty ( ) { self . expiry_index . remove ( & tracker . expiry_instant ) ; } } } }
The function removes the artifact download tracker if it exists in the
download list.
The function removes the artifact download tracker if it exists in the download list .
&mut self
integrity_hash
&CryptoHash