pub fn remove_peer(&mut self, peer_id: PeerId) -> Result<Vec<String>, ThrottleError> {
        let semaphores = self
            .ledger
            .remove(&peer_id)
            .ok_or(ThrottleError::UnknownPeer)?
            .clear();

        Ok(semaphores)
    }
/// Should a peer with `peer_id` be found, it is removed and the names of the semaphores it
/// holds is returned.
Should a peer with `peer_id` be found, it is removed and the names of the semaphores it
holds is returned.
Should a peer with ` peer_id ` be found it is removed and the names of the semaphores it holds is returned .
pub fn remove_peer(&mut self, peer_id: PeerId) -> Result<Vec<String>, ThrottleError> {
        let semaphores = self
            .ledger
            .remove(&peer_id)
            .ok_or(ThrottleError::UnknownPeer)?
            .clear();
        Ok(semaphores)
    }
pub fn remove_peer ( & mut self , peer_id : PeerId ) -> Result < Vec < String > , ThrottleError > { let semaphores = self . ledger . remove ( & peer_id ) . ok_or ( ThrottleError :: UnknownPeer ) ? . clear ( ) ; Ok ( semaphores ) }
Should a peer with `peer_id` be found, it is removed and the names of the semaphores it
holds is returned.
Should a peer with ` peer_id ` be found it is removed and the names of the semaphores it holds is returned .
&mut self
peer_id
PeerId
&mut self
peer_id
PeerId