@@ -21,7 +21,7 @@ use io::{self, DEFAULT_BUF_SIZE, Error, ErrorKind, SeekFrom};
21
21
use ptr;
22
22
use iter;
23
23
24
- /// Wraps a `Read` and buffers input from it
24
+ /// Wraps a `Read` and buffers input from it.
25
25
///
26
26
/// It can be excessively inefficient to work directly with a `Read` instance.
27
27
/// For example, every call to `read` on `TcpStream` results in a system call.
@@ -54,13 +54,13 @@ pub struct BufReader<R> {
54
54
}
55
55
56
56
impl < R : Read > BufReader < R > {
57
- /// Creates a new `BufReader` with a default buffer capacity
57
+ /// Creates a new `BufReader` with a default buffer capacity.
58
58
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
59
59
pub fn new ( inner : R ) -> BufReader < R > {
60
60
BufReader :: with_capacity ( DEFAULT_BUF_SIZE , inner)
61
61
}
62
62
63
- /// Creates a new `BufReader` with the specified buffer capacity
63
+ /// Creates a new `BufReader` with the specified buffer capacity.
64
64
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
65
65
pub fn with_capacity ( cap : usize , inner : R ) -> BufReader < R > {
66
66
let mut buf = Vec :: with_capacity ( cap) ;
@@ -183,7 +183,7 @@ impl<R: Seek> Seek for BufReader<R> {
183
183
}
184
184
}
185
185
186
- /// Wraps a Writer and buffers output to it
186
+ /// Wraps a Writer and buffers output to it.
187
187
///
188
188
/// It can be excessively inefficient to work directly with a `Write`. For
189
189
/// example, every call to `write` on `TcpStream` results in a system call. A
@@ -205,13 +205,13 @@ pub struct BufWriter<W: Write> {
205
205
pub struct IntoInnerError < W > ( W , Error ) ;
206
206
207
207
impl < W : Write > BufWriter < W > {
208
- /// Creates a new `BufWriter` with a default buffer capacity
208
+ /// Creates a new `BufWriter` with a default buffer capacity.
209
209
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
210
210
pub fn new ( inner : W ) -> BufWriter < W > {
211
211
BufWriter :: with_capacity ( DEFAULT_BUF_SIZE , inner)
212
212
}
213
213
214
- /// Creates a new `BufWriter` with the specified buffer capacity
214
+ /// Creates a new `BufWriter` with the specified buffer capacity.
215
215
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
216
216
pub fn with_capacity ( cap : usize , inner : W ) -> BufWriter < W > {
217
217
BufWriter {
@@ -253,11 +253,11 @@ impl<W: Write> BufWriter<W> {
253
253
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
254
254
pub fn get_ref ( & self ) -> & W { self . inner . as_ref ( ) . unwrap ( ) }
255
255
256
- /// Gets a mutable reference to the underlying write .
256
+ /// Gets a mutable reference to the underlying writer .
257
257
///
258
258
/// # Warning
259
259
///
260
- /// It is inadvisable to directly read from the underlying writer.
260
+ /// It is inadvisable to directly write to the underlying writer.
261
261
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
262
262
pub fn get_mut ( & mut self ) -> & mut W { self . inner . as_mut ( ) . unwrap ( ) }
263
263
0 commit comments