diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-04-14 16:39:08 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-04-14 17:04:40 +0200 |
| commit | d336a4b38a3e5cef1337f39c657beab76b60640e (patch) | |
| tree | 8bfc5ec581dff0b0f9f6b72c999318cfea9cfecd /embassy-traits/src | |
| parent | f292647066d2b693c1529faf409bbde060c26e12 (diff) | |
Remove Pin from Delay trait
Diffstat (limited to 'embassy-traits/src')
| -rw-r--r-- | embassy-traits/src/delay.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/embassy-traits/src/delay.rs b/embassy-traits/src/delay.rs index 1e763350b..31239d319 100644 --- a/embassy-traits/src/delay.rs +++ b/embassy-traits/src/delay.rs | |||
| @@ -1,12 +1,11 @@ | |||
| 1 | use core::future::Future; | 1 | use core::future::Future; |
| 2 | use core::pin::Pin; | ||
| 3 | 2 | ||
| 4 | pub trait Delay { | 3 | pub trait Delay { |
| 5 | type DelayFuture<'a>: Future<Output = ()> + 'a; | 4 | type DelayFuture<'a>: Future<Output = ()> + 'a; |
| 6 | 5 | ||
| 7 | /// Future that completes after now + millis | 6 | /// Future that completes after now + millis |
| 8 | fn delay_ms<'a>(self: Pin<&'a mut Self>, millis: u64) -> Self::DelayFuture<'a>; | 7 | fn delay_ms<'a>(&'a mut self, millis: u64) -> Self::DelayFuture<'a>; |
| 9 | 8 | ||
| 10 | /// Future that completes after now + micros | 9 | /// Future that completes after now + micros |
| 11 | fn delay_us<'a>(self: Pin<&'a mut Self>, micros: u64) -> Self::DelayFuture<'a>; | 10 | fn delay_us<'a>(&'a mut self, micros: u64) -> Self::DelayFuture<'a>; |
| 12 | } | 11 | } |
