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

feat: Update to std futures #254

Merged
merged 1 commit into from
Jun 6, 2020
Merged

Conversation

Marwes
Copy link
Contributor

@Marwes Marwes commented Jun 6, 2020

Updates all dependencies, including futures and tokio to support
std::future::Future. I tried to do as few changes as possible so there is very little async await used (not very idiomatic).

BREAKING CHANGE

Updates all dependencies, including futures and tokio to support
std::future::Future
@softprops
Copy link
Owner

@Marwes thank you for taking another stab at this. I'll take a look.

I find the easiest place to start looking more idiomatic is in the example main fns

going from examples that look like this

fn main()  {
  let _ = runtime.block_on(somefuture)
  let _ = runtime.block_on(some_other_future)
}

to examples that look like this

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
  let _ = somefuture.await?;
  let _ = some_other_future.await?;
}

This doesn't need to be a blocker and I could follow up on that if you'd like

@Marwes
Copy link
Contributor Author

Marwes commented Jun 6, 2020

I mainly wanted to get rid of the futures-0.1/tokio-0.1 dependencies. Anything beyond that can be done later.

@softprops softprops merged commit eb19395 into softprops:master Jun 6, 2020
@softprops
Copy link
Owner

I can dig it

@Marwes Marwes deleted the std_future branch June 6, 2020 21:31
@Marwes Marwes restored the std_future branch June 6, 2020 21:46
@Marwes Marwes deleted the std_future branch June 7, 2020 15:25
@Marwes Marwes restored the std_future branch June 7, 2020 15:25
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