pub fn release_lock(&mut self, peer_id: PeerId, semaphore: &str) -> Result<bool, ThrottleError> {
        let was_pending = self.ledger
            .get_mut(&peer_id)
            .ok_or(ThrottleError::UnknownPeer)?
            .release_lock(semaphore);
        Ok(was_pending)
    }
/// Release a lock associated with a peer.
/// 
/// # Return
/// 
/// `true` if the lock had been pending.
Release a lock associated with a peer.
Release a lock associated with a peer .
pub fn release_lock(&mut self, peer_id: PeerId, semaphore: &str) -> Result<bool, ThrottleError> {
        let was_pending = self.ledger
            .get_mut(&peer_id)
            .ok_or(ThrottleError::UnknownPeer)?
            .release_lock(semaphore);
        Ok(was_pending)
    }
pub fn release_lock ( & mut self , peer_id : PeerId , semaphore : & str ) -> Result < bool , ThrottleError > { let was_pending = self . ledger . get_mut ( & peer_id ) . ok_or ( ThrottleError :: UnknownPeer ) ? . release_lock ( semaphore ) ; Ok ( was_pending ) }
Release a lock associated with a peer.
Release a lock associated with a peer .
&mut self
peer_id
PeerId
semaphore
&str
`true` if the lock had been pending.
` true ` if the lock had been pending .
&mut self
peer_id
PeerId
semaphore
&str