fn pop_peer(&mut self, reserved_only: bool) -> Option<(PeerId, SlotType)> {
		if let Some((peer_id, _)) = self.reserved.pop_front() {
			return Some((peer_id, SlotType::Reserved));
		}

		if reserved_only {
			return None;
		}

		self.common.pop_front()
			.map(|(peer_id, _)| (peer_id, SlotType::Common))
	}
/// Pops the oldest peer from the list.
Pops the oldest peer from the list.
Pops the oldest peer from the list .
fn pop_peer(&mut self, reserved_only: bool) -> Option<(PeerId, SlotType)> {
		if let Some((peer_id, _)) = self.reserved.pop_front() {
			return Some((peer_id, SlotType::Reserved));
		}
		if reserved_only {
			return None;
		}
		self.common.pop_front()
			.map(|(peer_id, _)| (peer_id, SlotType::Common))
	}
fn pop_peer ( & mut self , reserved_only : bool ) -> Option < ( PeerId , SlotType ) > { if let Some ( ( peer_id , _ ) ) = self . reserved . pop_front ( ) { return Some ( ( peer_id , SlotType :: Reserved ) ) ; } if reserved_only { return None ; } self . common . pop_front ( ) . map ( | ( peer_id , _ ) | ( peer_id , SlotType :: Common ) ) }
Pops the oldest peer from the list.
Pops the oldest peer from the list .
&mut self
reserved_only
bool
&mut self
reserved_only
bool