You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backon/src/blocking_sleep.rs
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ pub type DefaultBlockingSleeper = StdSleeper;
36
36
///
37
37
/// Users should enable a feature of this crate that provides a valid [`Sleeper`] implementation when this type appears in compilation errors. Alternatively, a custom [`Sleeper`] implementation should be provided where necessary, such as in [`crate::Retry::sleeper`].
Copy file name to clipboardExpand all lines: backon/src/sleep.rs
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ use core::time::Duration;
5
5
/// A sleeper is used to generate a future that completes after a specified duration.
6
6
pubtraitSleeper:'static{
7
7
/// The future returned by the `sleep` method.
8
-
typeSleep:Future<Output = ()>;
8
+
typeSleep:Future;
9
9
10
10
/// Create a future that completes after a set period.
11
11
fnsleep(&self,dur:Duration) -> Self::Sleep;
@@ -15,16 +15,16 @@ pub trait Sleeper: 'static {
15
15
/// It does not provide actual functionality.
16
16
#[doc(hidden)]
17
17
pubtraitMaybeSleeper:'static{
18
-
typeSleep:Future<Output = ()>;
18
+
typeSleep:Future;
19
19
}
20
20
21
21
/// All `Sleeper` will implement `MaybeSleeper`, but not vice versa.
22
22
impl<T:Sleeper + ?Sized>MaybeSleeperforT{
23
23
typeSleep = <TasSleeper>::Sleep;
24
24
}
25
25
26
-
/// All `Fn(Duration) -> impl Future<Output = ()>` implements `Sleeper`.
27
-
impl<F:Fn(Duration) -> Fut + 'static,Fut:Future<Output = ()>>SleeperforF{
26
+
/// All `Fn(Duration) -> impl Future` implements `Sleeper`.
27
+
impl<F:Fn(Duration) -> Fut + 'static,Fut:Future>SleeperforF{
28
28
typeSleep = Fut;
29
29
30
30
fnsleep(&self,dur:Duration) -> Self::Sleep{
@@ -52,6 +52,7 @@ pub type DefaultSleeper = GlooTimersSleep;
52
52
///
53
53
/// Users should enable a feature of this crate that provides a valid [`Sleeper`] implementation when this type appears in compilation errors. Alternatively, a custom [`Sleeper`] implementation should be provided where necessary, such as in [`crate::Retry::sleeper`].
0 commit comments