Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding timeout extension method to Future trait #600

Merged
merged 14 commits into from
Dec 20, 2019

Conversation

miker1423
Copy link
Contributor

This would close issue #564

src/future/timeout.rs Outdated Show resolved Hide resolved
src/future/future/mod.rs Show resolved Hide resolved
@miker1423
Copy link
Contributor Author

Hello! I got two errors like the following on the rust fmt check, but I don't understand what I should do to solve them.

 #[test]
 fn should_not_timeout() {
-    task::block_on(async {        
+    task::block_on(async {
         let fut = future::ready(0);
         let dur = Duration::from_millis(100);
         let res = fut.timeout(dur).await;
Diff in /home/runner/work/async-std/async-std/tests/timeout_future.rs at line 25:

tests/timeout_future.rs Outdated Show resolved Hide resolved
@k-nasa
Copy link
Member

k-nasa commented Dec 6, 2019

@miker1423
My editor highlights unnecessary spaces at the end of lines. Maybe this is the cause of the error?
Can I fix it by running cargo fmt?

スクリーンショット 2019-12-06 11 37 12

tests/timeout_future.rs Outdated Show resolved Hide resolved
Copy link
Member

@k-nasa k-nasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The merge is coming soon! Please make some corrections.

src/future/future/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@k-nasa k-nasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@miker1423
Please make a few corrections!
I think the rest is perfect.

Then, please merge or rebase the master branch.

src/future/future/mod.rs Outdated Show resolved Hide resolved
src/future/future/mod.rs Outdated Show resolved Hide resolved
Copy link
Member

@k-nasa k-nasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent; thanks heaps!

@k-nasa k-nasa merged commit 0d4b4cd into async-rs:master Dec 20, 2019
@miker1423 miker1423 mentioned this pull request Dec 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants