@@ -102,7 +102,7 @@ pub trait AsyncReadExt: AsyncRead {
102
102
///
103
103
/// assert_eq!(bytes, 4);
104
104
/// assert_eq!(writer.into_inner(), [1, 2, 3, 4, 0]);
105
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
105
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
106
106
/// ```
107
107
fn copy_into < ' a , W > (
108
108
& ' a mut self ,
@@ -137,7 +137,7 @@ pub trait AsyncReadExt: AsyncRead {
137
137
/// // `output.len()` bytes in a single read.
138
138
/// assert_eq!(bytes, 4);
139
139
/// assert_eq!(output, [1, 2, 3, 4, 0]);
140
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
140
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
141
141
/// ```
142
142
fn read < ' a > ( & ' a mut self , buf : & ' a mut [ u8 ] ) -> Read < ' a , Self >
143
143
where Self : Unpin ,
@@ -178,7 +178,7 @@ pub trait AsyncReadExt: AsyncRead {
178
178
/// reader.read_exact(&mut output).await?;
179
179
///
180
180
/// assert_eq!(output, [1, 2, 3, 4]);
181
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
181
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
182
182
/// ```
183
183
///
184
184
/// ## EOF is hit before `buf` is filled
@@ -222,7 +222,7 @@ pub trait AsyncReadExt: AsyncRead {
222
222
/// reader.read_to_end(&mut output).await?;
223
223
///
224
224
/// assert_eq!(output, vec![1, 2, 3, 4]);
225
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
225
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
226
226
/// ```
227
227
fn read_to_end < ' a > (
228
228
& ' a mut self ,
@@ -262,7 +262,7 @@ pub trait AsyncReadExt: AsyncRead {
262
262
///
263
263
/// assert_eq!(buffer.into_inner(), [1, 2, 3, 4, 5, 6, 7, 8]);
264
264
/// assert_eq!(writer.into_inner(), [5, 6, 7, 8, 0]);
265
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
265
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
266
266
/// ```
267
267
fn split ( self ) -> ( ReadHalf < Self > , WriteHalf < Self > )
268
268
where Self : AsyncWrite + Sized ,
@@ -301,15 +301,15 @@ pub trait AsyncWriteExt: AsyncWrite {
301
301
/// let mut output = [0u8; 5];
302
302
///
303
303
/// {
304
- /// let mut writer = Cursor::new(&mut output[..]);
304
+ /// let writer = Cursor::new(&mut output[..]);
305
305
/// let mut buffered = AllowStdIo::new(BufWriter::new(writer));
306
306
/// buffered.write_all(&[1, 2]).await?;
307
307
/// buffered.write_all(&[3, 4]).await?;
308
308
/// buffered.flush().await?;
309
309
/// }
310
310
///
311
311
/// assert_eq!(output, [1, 2, 3, 4, 0]);
312
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
312
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
313
313
/// ```
314
314
fn flush ( & mut self ) -> Flush < ' _ , Self >
315
315
where Self : Unpin ,
@@ -365,7 +365,7 @@ pub trait AsyncWriteExt: AsyncWrite {
365
365
/// writer.write_all(&[1, 2, 3, 4]).await?;
366
366
///
367
367
/// assert_eq!(writer.into_inner(), [1, 2, 3, 4, 0]);
368
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
368
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
369
369
/// ```
370
370
fn write_all < ' a > ( & ' a mut self , buf : & ' a [ u8 ] ) -> WriteAll < ' a , Self >
371
371
where Self : Unpin ,
@@ -445,7 +445,7 @@ pub trait AsyncBufReadExt: AsyncBufRead {
445
445
/// let num_bytes = cursor.read_until(b'-', &mut buf).await?;
446
446
/// assert_eq!(num_bytes, 0);
447
447
/// assert_eq!(buf, b"");
448
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
448
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
449
449
/// ```
450
450
fn read_until < ' a > (
451
451
& ' a mut self ,
@@ -508,7 +508,7 @@ pub trait AsyncBufReadExt: AsyncBufRead {
508
508
/// let num_bytes = cursor.read_line(&mut buf).await?;
509
509
/// assert_eq!(num_bytes, 0);
510
510
/// assert_eq!(buf, "");
511
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
511
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
512
512
/// ```
513
513
fn read_line < ' a > ( & ' a mut self , buf : & ' a mut String ) -> ReadLine < ' a , Self >
514
514
where Self : Unpin ,
@@ -548,7 +548,7 @@ pub trait AsyncBufReadExt: AsyncBufRead {
548
548
/// assert_eq!(lines_stream.next().await, Some(String::from("ipsum")));
549
549
/// assert_eq!(lines_stream.next().await, Some(String::from("dolor")));
550
550
/// assert_eq!(lines_stream.next().await, None);
551
- /// # Ok::<(), Box<std::error::Error>>(()) }).unwrap();
551
+ /// # Ok::<(), Box<dyn std::error::Error>>(()) }).unwrap();
552
552
/// ```
553
553
fn lines ( self ) -> Lines < Self >
554
554
where Self : Sized ,
0 commit comments