mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 08:57:56 +00:00
Clean up sc-peerset (#9806)
* Clean up sc-peerset * cargo +nightly fmt --all * Nit * Nit * . * Nit * . * Apply suggestions from code review * . * Update client/peerset/src/peersstate.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -155,14 +155,14 @@ pub enum Role {
|
||||
}
|
||||
|
||||
impl Role {
|
||||
/// True for `Role::Authority`
|
||||
/// True for [`Role::Authority`].
|
||||
pub fn is_authority(&self) -> bool {
|
||||
matches!(self, Role::Authority { .. })
|
||||
matches!(self, Self::Authority { .. })
|
||||
}
|
||||
|
||||
/// True for `Role::Light`
|
||||
/// True for [`Role::Light`].
|
||||
pub fn is_light(&self) -> bool {
|
||||
matches!(self, Role::Light { .. })
|
||||
matches!(self, Self::Light { .. })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -329,7 +329,7 @@ impl FromStr for MultiaddrWithPeerId {
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
let (peer_id, multiaddr) = parse_str_addr(s)?;
|
||||
Ok(MultiaddrWithPeerId { peer_id, multiaddr })
|
||||
Ok(Self { peer_id, multiaddr })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user