mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 17:41:22 +00:00
*: Fix clippy warnings (#2227)
This commit is contained in:
@ -194,7 +194,7 @@ impl GossipsubCodec {
|
||||
}
|
||||
};
|
||||
|
||||
let source = match PeerId::from_bytes(&from) {
|
||||
let source = match PeerId::from_bytes(from) {
|
||||
Ok(v) => v,
|
||||
Err(_) => {
|
||||
debug!("Signature verification failed: Invalid Peer Id");
|
||||
@ -214,8 +214,8 @@ impl GossipsubCodec {
|
||||
// obtained from the inlined source peer_id.
|
||||
let public_key = match message
|
||||
.key
|
||||
.as_ref()
|
||||
.map(|key| PublicKey::from_protobuf_encoding(&key))
|
||||
.as_deref()
|
||||
.map(PublicKey::from_protobuf_encoding)
|
||||
{
|
||||
Some(Ok(key)) => key,
|
||||
_ => match PublicKey::from_protobuf_encoding(&source.to_bytes()[2..]) {
|
||||
|
Reference in New Issue
Block a user