瀏覽代碼

Appease rustfmt

Nicholas Cyprus 2 年之前
父節點
當前提交
af73ab69a2
共有 1 個文件被更改,包括 5 次插入4 次删除
  1. 5 4
      src/socket/raw.rs

+ 5 - 4
src/socket/raw.rs

@@ -253,8 +253,10 @@ impl<'a> Socket<'a> {
     ///
     /// It returns `Err(Error::Exhausted)` if the receive buffer is empty.
     pub fn peek(&mut self) -> Result<&[u8], RecvError> {
-        self.rx_buffer.peek().map_err(|_| RecvError::Exhausted).map(
-            |((), payload_buf)| {
+        self.rx_buffer
+            .peek()
+            .map_err(|_| RecvError::Exhausted)
+            .map(|((), payload_buf)| {
                 net_trace!(
                     "raw:{}:{}: peek {} buffered octets",
                     self.ip_version,
@@ -262,8 +264,7 @@ impl<'a> Socket<'a> {
                     payload_buf.len()
                 );
                 payload_buf
-            },
-        )
+            })
     }
 
     /// Peek at a packet in the receive buffer, copy the payload into the given slice,