From c111bee3b6156f087588f6eb25a7ce9d91bfed90 Mon Sep 17 00:00:00 2001 From: luojia65 Date: Wed, 27 Oct 2021 16:35:05 +0800 Subject: [PATCH] Code format using `cargo fmt` --- src/socket/tcp.rs | 3 ++- src/storage/packet_buffer.rs | 2 +- src/storage/ring_buffer.rs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/socket/tcp.rs b/src/socket/tcp.rs index b8fbcdd..064fd5f 100644 --- a/src/socket/tcp.rs +++ b/src/socket/tcp.rs @@ -1875,7 +1875,8 @@ impl<'a> TcpSocket<'a> { payload_len, payload_offset ); - let len_written = self.rx_buffer + let len_written = self + .rx_buffer .write_unallocated(payload_offset, repr.payload); debug_assert!(len_written == payload_len); } diff --git a/src/storage/packet_buffer.rs b/src/storage/packet_buffer.rs index db318bb..4a5080b 100644 --- a/src/storage/packet_buffer.rs +++ b/src/storage/packet_buffer.rs @@ -102,7 +102,7 @@ impl<'a, H> PacketBuffer<'a, H> { // Add padding to the end of the ring buffer so that the // contiguous window is at the beginning of the ring buffer. *self.metadata_ring.enqueue_one()? = PacketMetadata::padding(contig_window); - // note(discard): function does not write to the result + // note(discard): function does not write to the result // enqueued padding buffer location let _buf_enqueued = self.payload_ring.enqueue_many(contig_window); } diff --git a/src/storage/ring_buffer.rs b/src/storage/ring_buffer.rs index 67dcf6a..f54837b 100644 --- a/src/storage/ring_buffer.rs +++ b/src/storage/ring_buffer.rs @@ -1,4 +1,4 @@ -// Some of the functions in ring buffer is marked as #[must_use]. It notes that +// Some of the functions in ring buffer is marked as #[must_use]. It notes that // these functions may have side effects, and it's implemented by [RFC 1940]. // [RFC 1940]: https://github.com/rust-lang/rust/issues/43302