-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return named future type from async-time-mock-tokio sleep methods
Uses the async-time-mock-macros create_mock_future macro.
- Loading branch information
Showing
5 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mod create_mock_future; | ||
|
||
#[doc(hidden)] | ||
pub use pin_project_lite::pin_project; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use crate::TimeHandlerGuard; | ||
#[cfg(feature = "mock")] | ||
use async_time_mock_core::TimerListener; | ||
use async_time_mock_macros::create_mock_future; | ||
|
||
create_mock_future!( | ||
Sleep, | ||
TimeHandlerGuard, | ||
tokio::time::Sleep, | ||
TimerListener, | ||
|()| TimeHandlerGuard::Real, | ||
TimeHandlerGuard::from | ||
); |