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

Upgrade to Tokio 1.0 #49

Merged
merged 2 commits into from
Jan 12, 2021
Merged

Upgrade to Tokio 1.0 #49

merged 2 commits into from
Jan 12, 2021

Conversation

jaboatman
Copy link
Contributor

  • Upgrade to tokio 1.0
  • Fix building the library outside of the directory (see below)
  • Reduced number of futures based dependencies by directly depending on the required sub-crates.

For a long while I have been using mobc 0.5 because mobc 0.6 would always fail to compile with this error:

image

However, the crate builds fine when you clone it and build. So what's the deal? Turns out if you have a crate as a dependency and a dev-dependency, it will include the features for the crate from both builds. See here: rust-lang/cargo#7915

Since dev-dependencies aren't included when using the crate as a library, we were left with only the features specified in the [dependencies] section.

Well, starting in tokio 0.3 (and 1.0 for that matter) calling Runtime::new directly requires the rt-multi-thread feature:

https://docs.rs/tokio/1.0.1/tokio/runtime/struct.Runtime.html#method.new
image

This issue is fixed in this PR by adding the required feature.

Closes: #48

@importcjj importcjj merged commit d80da1b into importcjj:master Jan 12, 2021
@importcjj
Copy link
Owner

Sorry for the late. At first, thanks for your contribution, I will publish a new version if there are no other problems.

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.

Upgrade to Tokio 1.0
2 participants