File tree Expand file tree Collapse file tree 7 files changed +7
-25
lines changed Expand file tree Collapse file tree 7 files changed +7
-25
lines changed Original file line number Diff line number Diff line change @@ -23,14 +23,12 @@ cfg_unstable_default! {
23
23
pub use core:: future:: Future as Future ;
24
24
25
25
extension_trait ! {
26
- pub trait Future { }
27
-
28
26
#[ doc = r#"
29
27
Extension methods for [`Future`].
30
28
31
29
[`Future`]: ../future/trait.Future.html
32
30
"# ]
33
- pub trait FutureExt : core :: future :: Future {
31
+ pub trait FutureExt : Future {
34
32
/// Returns a Future that delays execution for a specified time.
35
33
///
36
34
/// # Examples
Original file line number Diff line number Diff line change @@ -18,14 +18,12 @@ use crate::task::{Context, Poll};
18
18
pub use futures_io:: AsyncBufRead as BufRead ;
19
19
20
20
extension_trait ! {
21
- pub trait BufRead { }
22
-
23
21
#[ doc = r#"
24
22
Extension methods for [`BufRead`].
25
23
26
24
[`BufRead`]: ../trait.BufRead.html
27
25
"# ]
28
- pub trait BufReadExt : futures_io :: AsyncBufRead {
26
+ pub trait BufReadExt : BufRead {
29
27
#[ doc = r#"
30
28
Reads all bytes into `buf` until the delimiter `byte` or EOF is reached.
31
29
Original file line number Diff line number Diff line change @@ -24,14 +24,12 @@ pub use take::Take;
24
24
pub use futures_io:: AsyncRead as Read ;
25
25
26
26
extension_trait ! {
27
- pub trait Read { }
28
-
29
27
#[ doc = r#"
30
28
Extension methods for [`Read`].
31
29
32
30
[`Read`]: ../trait.Read.html
33
31
"# ]
34
- pub trait ReadExt : futures_io :: AsyncRead {
32
+ pub trait ReadExt : Read {
35
33
#[ doc = r#"
36
34
Reads some bytes from the byte stream.
37
35
Original file line number Diff line number Diff line change @@ -7,14 +7,12 @@ use crate::io::SeekFrom;
7
7
pub use futures_io:: AsyncSeek as Seek ;
8
8
9
9
extension_trait ! {
10
- pub trait Seek { }
11
-
12
10
#[ doc = r#"
13
11
Extension methods for [`Seek`].
14
12
15
13
[`Seek`]: ../trait.Seek.html
16
14
"# ]
17
- pub trait SeekExt : futures_io :: AsyncSeek {
15
+ pub trait SeekExt : Seek {
18
16
#[ doc = r#"
19
17
Seeks to a new position in a byte stream.
20
18
Original file line number Diff line number Diff line change @@ -15,14 +15,12 @@ use crate::io::{self, IoSlice};
15
15
pub use futures_io:: AsyncWrite as Write ;
16
16
17
17
extension_trait ! {
18
- pub trait Write { }
19
-
20
18
#[ doc = r#"
21
19
Extension methods for [`Write`].
22
20
23
21
[`Write`]: ../trait.Write.html
24
22
"# ]
25
- pub trait WriteExt : futures_io :: AsyncWrite {
23
+ pub trait WriteExt : Write {
26
24
#[ doc = r#"
27
25
Writes some bytes into the byte stream.
28
26
Original file line number Diff line number Diff line change @@ -146,14 +146,12 @@ cfg_unstable! {
146
146
pub use futures_core:: stream:: Stream as Stream ;
147
147
148
148
extension_trait ! {
149
- pub trait Stream { }
150
-
151
149
#[ doc = r#"
152
150
Extension methods for [`Stream`].
153
151
154
152
[`Stream`]: ../stream/trait.Stream.html
155
153
"# ]
156
- pub trait StreamExt : futures_core :: stream :: Stream {
154
+ pub trait StreamExt : Stream {
157
155
#[ doc = r#"
158
156
Advances the stream and returns the next value.
159
157
Original file line number Diff line number Diff line change @@ -246,14 +246,8 @@ macro_rules! cfg_default {
246
246
#[ doc( hidden) ]
247
247
macro_rules! extension_trait {
248
248
(
249
- // Interesting patterns:
250
- // - `$name`: trait name that gets rendered in the docs
251
- // - `$ext`: name of the hidden extension trait
252
- // - `$base`: base trait
253
- pub trait $name: ident { }
254
-
255
249
#[ doc = $doc_ext: tt]
256
- pub trait $ext: ident: $base : path {
250
+ pub trait $ext: ident: $name : ident {
257
251
$( $body_ext: tt) *
258
252
}
259
253
) => {
You can’t perform that action at this time.
0 commit comments