-
Notifications
You must be signed in to change notification settings - Fork 8
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 Send + Sync trait bounds #13
Conversation
Futures that are missing the Send and Sync trait bounds are inconvenient when a work stealing runtime like tokio
Independent from this PR. I've rewritte the library (https://github.com/raui100/rust-clamav-client) to improve the ergonomics:
The changes are not backwards compatible and I've changed the API at a few places: All tests are adapted and I'm testing everything for the tokio and async_std runtime. The test work on macOS however GitHub Actions fail for ubuntu (and maybe windows). I wanted to ask if you are interested to adapt all or some of these changes? I'd open a new PR for that. We could also try to minimize the breakage for users by keeping the "old" function based API. I'd prefer to not add yet another ClamAV client to crates.io |
Thank you! I'll take a closer look in the next few days. In the meantime, could you add a test for your use case? Why do you want to bump the version to |
I've added a test. I want to bump to version Also I'd recommend to use the following #[derive(Debug, Clone)]
pub struct Socket {
pub socket_path: std::path::PathBuf,
}
#[derive(Debug, Clone)]
pub struct Tcp {
pub host_address: std::net::SocketAddr,
} |
This should be the best of both worlds. There are minimal breaking changes downstream (only the |
I've been thinking about some of your changes already, but would prefer small, incremental changes instead of a rewrite. |
I created #14 based on your first commits and simplified it. This should fix your initial I've also added you to the list of contributors. Thanks again! I'm open to other changes, but let's keep them small if possible. Otherwise, I won't be able to review them anytime soon. |
Futures that are missing the Send and Sync trait bounds are inconvenient when using a work stealing runtime like tokio.
The following code doesn't compile:
compiler error
This PR adds the corresponding trait bounds, removes the
async-trait
and upps the version number to2.0.0
according to semver.