mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-02 11:11:36 +00:00
Chore/semi colons (#799)
* Add helpers for easier Transports creation (#777) * Add helpers for easier Transports creation * Fix doctests * Fix ' ;' occurrences
This commit is contained in:
committed by
Toralf Wittner
parent
83320e0347
commit
f541df391a
@ -51,10 +51,10 @@ pub fn decode_character_string(mut from: &[u8]) -> Result<Cow<[u8]>, ()> {
|
||||
pub fn build_query() -> Vec<u8> {
|
||||
let mut out = Vec::with_capacity(33);
|
||||
|
||||
// Program-generated transaction ID ; unused by our implementation.
|
||||
// Program-generated transaction ID; unused by our implementation.
|
||||
append_u16(&mut out, rand::random());
|
||||
|
||||
// Flags ; 0x0 for a regular query.
|
||||
// 0x0 flag for a regular query.
|
||||
append_u16(&mut out, 0x0);
|
||||
|
||||
// Number of questions.
|
||||
@ -98,7 +98,7 @@ pub fn build_query_response(
|
||||
let mut out = Vec::with_capacity(320);
|
||||
|
||||
append_u16(&mut out, id);
|
||||
// Flags ; 0x84 for an answer.
|
||||
// 0x84 flag for an answer.
|
||||
append_u16(&mut out, 0x8400);
|
||||
// Number of questions, answers, authorities, additionals.
|
||||
append_u16(&mut out, 0x0);
|
||||
@ -156,7 +156,7 @@ pub fn build_service_discovery_response(id: u16, ttl: Duration) -> Vec<u8> {
|
||||
let mut out = Vec::with_capacity(69);
|
||||
|
||||
append_u16(&mut out, id);
|
||||
// Flags ; 0x84 for an answer.
|
||||
// 0x84 flag for an answer.
|
||||
append_u16(&mut out, 0x8400);
|
||||
// Number of questions, answers, authorities, additionals.
|
||||
append_u16(&mut out, 0x0);
|
||||
|
@ -175,7 +175,7 @@ impl MdnsService {
|
||||
/// Polls the service for packets.
|
||||
pub fn poll(&mut self) -> Async<MdnsPacket> {
|
||||
// Send a query every time `query_interval` fires.
|
||||
// Note that we don't use a loop here ; it is pretty unlikely that we need it, and there is
|
||||
// Note that we don't use a loop here—it is pretty unlikely that we need it, and there is
|
||||
// no point in sending multiple requests in a row.
|
||||
match self.query_interval.poll() {
|
||||
Ok(Async::Ready(_)) => {
|
||||
@ -472,7 +472,7 @@ impl<'a> fmt::Debug for MdnsResponse<'a> {
|
||||
|
||||
/// A peer discovered by the service.
|
||||
pub struct MdnsPeer<'a> {
|
||||
/// The original packet ; will be used to determine the addresses.
|
||||
/// The original packet which will be used to determine the addresses.
|
||||
packet: &'a Packet<'a>,
|
||||
/// Cached value of `concat(base32(peer_id), service name)`.
|
||||
record_value: String,
|
||||
|
Reference in New Issue
Block a user