whitequark 7 年 前
コミット
8ee2f7bff5
2 ファイル変更3 行追加3 行削除
  1. 1 1
      src/socket/udp.rs
  2. 2 2
      src/storage/ring_buffer.rs

+ 1 - 1
src/socket/udp.rs

@@ -51,7 +51,7 @@ impl<'a> Resettable for PacketBuffer<'a> {
 }
 
 /// An UDP packet ring buffer.
-pub type SocketBuffer<'a, 'b : 'a> = RingBuffer<'a, PacketBuffer<'b>>;
+pub type SocketBuffer<'a, 'b: 'a> = RingBuffer<'a, PacketBuffer<'b>>;
 
 /// An User Datagram Protocol socket.
 ///

+ 2 - 2
src/storage/ring_buffer.rs

@@ -594,7 +594,7 @@ mod test {
 
     #[test]
     fn test_buffer_get_unallocated() {
-        let mut ring = RingBuffer::new(vec![b'.'; 12]);;
+        let mut ring = RingBuffer::new(vec![b'.'; 12]);
 
         assert_eq!(ring.get_unallocated(16, 4), b"");
 
@@ -643,7 +643,7 @@ mod test {
 
     #[test]
     fn test_buffer_get_allocated() {
-        let mut ring = RingBuffer::new(vec![b'.'; 12]);;
+        let mut ring = RingBuffer::new(vec![b'.'; 12]);
 
         assert_eq!(ring.get_allocated(16, 4), b"");
         assert_eq!(ring.get_allocated(0, 4),  b"");