Эх сурвалжийг харах

Code format using `cargo fmt`

luojia65 3 жил өмнө
parent
commit
7a0df7da91

+ 2 - 1
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);
             }

+ 1 - 1
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);
             }

+ 1 - 1
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