Skip to content

Commit 85f5cd7

Browse files
committed
fixes
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
1 parent bd9aaf5 commit 85f5cd7

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

src/future/future/mod.rs

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
mod select;
2-
mod try_select;
1+
cfg_unstable! {
2+
mod select;
3+
mod try_select;
34

4-
use select::Select;
5-
use try_select::TrySelect;
5+
use select::Select;
6+
use try_select::TrySelect;
7+
}
68

79
extension_trait! {
810
use std::pin::Pin;
@@ -135,11 +137,13 @@ extension_trait! {
135137
# });
136138
```
137139
"#]
140+
#[cfg(any(feature = "unstable", feature = "docs"))]
141+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
138142
fn select<F>(self, other: F) ->
139-
impl Future<Output = Self::Output> [Select<Self, F>]
140-
where
141-
Self: Sized + Future,
142-
F: std::future::Future<Output = <Self as Future>::Output>,
143+
impl Future<Output = Self::Output> [Select<Self, F>]
144+
where
145+
Self: Sized + Future,
146+
F: std::future::Future<Output = <Self as Future>::Output>,
143147
{
144148
Select::new(self, other)
145149
}
@@ -172,12 +176,14 @@ extension_trait! {
172176
# Ok(()) }) }
173177
```
174178
"#]
179+
#[cfg(any(feature = "unstable", feature = "docs"))]
180+
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
175181
fn try_select<F, T, E>(self, other: F) ->
176-
impl Future<Output = Self::Output> [TrySelect<Self, F>]
177-
where
178-
Self: Sized,
179-
Self: Future<Output = Result<T, E>>,
180-
F: Future<Output = Self::Output>,
182+
impl Future<Output = Self::Output> [TrySelect<Self, F>]
183+
where
184+
Self: Sized,
185+
Self: Future<Output = Result<T, E>>,
186+
F: Future<Output = Self::Output>,
181187
{
182188
TrySelect::new(self, other)
183189
}

0 commit comments

Comments
 (0)