mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-28 09:11:34 +00:00
Remove spaces before semicolons (#591)
This commit is contained in:
committed by
Pierre Krieger
parent
585c90a33c
commit
45cd7db6e9
@ -88,7 +88,7 @@ impl KadPeer {
|
||||
// Builds a `KadPeer` from its raw protobuf equivalent.
|
||||
// TODO: use TryFrom once stable
|
||||
fn from_peer(peer: &mut protobuf_structs::dht::Message_Peer) -> Result<KadPeer, IoError> {
|
||||
// TODO: this is in fact a CID ; not sure if this should be handled in `from_bytes` or
|
||||
// TODO: this is in fact a CID; not sure if this should be handled in `from_bytes` or
|
||||
// as a special case here
|
||||
let node_id = PeerId::from_bytes(peer.get_id().to_vec())
|
||||
.map_err(|_| IoError::new(IoErrorKind::InvalidData, "invalid peer id"))?;
|
||||
@ -339,7 +339,7 @@ fn proto_to_msg(mut message: protobuf_structs::dht::Message) -> Result<KadMsg, I
|
||||
|
||||
} else {
|
||||
// TODO: for now we don't parse the peer properly, so it is possible that we get
|
||||
// parsing errors for peers even when they are valid ; we ignore these
|
||||
// parsing errors for peers even when they are valid; we ignore these
|
||||
// errors for now, but ultimately we should just error altogether
|
||||
let closer_peers = message.mut_closerPeers()
|
||||
.iter_mut()
|
||||
@ -362,7 +362,7 @@ fn proto_to_msg(mut message: protobuf_structs::dht::Message) -> Result<KadMsg, I
|
||||
|
||||
} else {
|
||||
// TODO: for now we don't parse the peer properly, so it is possible that we get
|
||||
// parsing errors for peers even when they are valid ; we ignore these
|
||||
// parsing errors for peers even when they are valid; we ignore these
|
||||
// errors for now, but ultimately we should just error altogether
|
||||
let closer_peers = message.mut_closerPeers()
|
||||
.iter_mut()
|
||||
@ -382,7 +382,7 @@ fn proto_to_msg(mut message: protobuf_structs::dht::Message) -> Result<KadMsg, I
|
||||
|
||||
protobuf_structs::dht::Message_MessageType::ADD_PROVIDER => {
|
||||
// TODO: for now we don't parse the peer properly, so it is possible that we get
|
||||
// parsing errors for peers even when they are valid ; we ignore these
|
||||
// parsing errors for peers even when they are valid; we ignore these
|
||||
// errors for now, but ultimately we should just error altogether
|
||||
let provider_peer = message.mut_providerPeers()
|
||||
.iter_mut()
|
||||
|
Reference in New Issue
Block a user