Skip to content

Commit 325455f

Browse files
committed
formatting
1 parent b1c0672 commit 325455f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/std/src/io/buffered/bufreader.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use crate::cmp;
22
use crate::fmt;
33
use crate::io::{
4-
self, BufRead, IoSliceMut, Read, ReadBuf, ReadBufRef, Seek, SeekFrom, SizeHint, DEFAULT_BUF_SIZE,
4+
self, BufRead, IoSliceMut, Read, ReadBuf, ReadBufRef, Seek, SeekFrom, SizeHint,
5+
DEFAULT_BUF_SIZE,
56
};
67
use crate::mem::MaybeUninit;
78

library/std/src/io/readbuf.rs

+4-5
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ impl<'a> ReadBuf<'a> {
6161
/// Creates a new [`ReadBufRef`] referencing this `ReadBuf`.
6262
#[inline]
6363
pub fn borrow(&mut self) -> ReadBufRef<'_, 'a> {
64-
ReadBufRef {read_buf: self}
64+
ReadBufRef { read_buf: self }
6565
}
6666

6767
/// Returns the total capacity of the buffer.
@@ -250,17 +250,16 @@ impl<'a> ReadBuf<'a> {
250250
}
251251
}
252252

253-
254253
/// A wrapper around [`&mut ReadBuf`](ReadBuf) which prevents the buffer that the `ReadBuf` points to from being replaced.
255254
#[derive(Debug)]
256255
pub struct ReadBufRef<'a, 'b> {
257-
read_buf: &'a mut ReadBuf<'b>
256+
read_buf: &'a mut ReadBuf<'b>,
258257
}
259258

260259
impl<'a, 'b> ReadBufRef<'a, 'b> {
261260
/// Creates a new `ReadBufRef` referencing the same `ReadBuf` as this one.
262261
pub fn reborrow(&mut self) -> ReadBufRef<'_, 'b> {
263-
ReadBufRef {read_buf: self.read_buf}
262+
ReadBufRef { read_buf: self.read_buf }
264263
}
265264

266265
/// Returns the total capacity of the buffer.
@@ -411,4 +410,4 @@ impl<'a, 'b> ReadBufRef<'a, 'b> {
411410
pub fn initialized_len(&self) -> usize {
412411
self.read_buf.initialized_len()
413412
}
414-
}
413+
}

0 commit comments

Comments
 (0)