-
Notifications
You must be signed in to change notification settings - Fork 42
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
Initial support for tokio #121
Open
SapryWenInera
wants to merge
23
commits into
zip-rs:sync-async
Choose a base branch
from
SapryWenInera:async_pr
base: sync-async
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
2afb5a1
Add sync feature to Cargo.toml
SapryWenInera e0b6be7
Add initial error message for when io logic is missing do to feature …
SapryWenInera 975fbec
Add sync and tokio features and sync is on default
SapryWenInera c056382
Add compile error for missing/conflicting features
SapryWenInera 8afd567
Begin async support on spec module
SapryWenInera 5f548a3
Merge remote-tracking branch 'upstream/master' into async_pr
SapryWenInera 45f918c
Move synchronous code into sync submodule
SapryWenInera aae1098
Merge branch 'master' into async_pr
Pr0methean a14f6a7
Merge branch 'master' into async_pr
Pr0methean 62788e2
docs: Add `package.metadata.docs.rs`
sorairolake 933ccc4
Enable deflate-zlib as well, and keep deflate64 separate
Pr0methean 57eaa50
ci(fuzz): Update seed corpora
Pr0methean 4b295d3
Merge pull request #135 from sorairolake/docsrs
Pr0methean dc83532
Merge branch 'zip-rs:master' into async_pr
SapryWenInera af5752b
Add sync feature to Cargo.toml
SapryWenInera f871fff
Add initial error message for when io logic is missing do to feature …
SapryWenInera 951184a
Add sync and tokio features and sync is on default
SapryWenInera ff97edd
Add compile error for missing/conflicting features
SapryWenInera 8129f2e
Finished rebasing to upstream/sync-async branch
SapryWenInera e5af56f
Begin async support on spec module
SapryWenInera c95da50
Move synchronous code into sync submodule
SapryWenInera 2e6053e
Updated CI
SapryWenInera 794a1d0
Sync feature enablement
SapryWenInera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please make it possible to build with both
sync
andtokio
? To do this, you can invoke the traits with an explicit self parameter, e.g.Read::read_exact(self, buf)
andAsyncRead::read_exact(self, buf)
instead ofself.read_exact(buf)
. Since methods with the same name don't conflict when they're specified in different traits, this should be the only change needed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, I found a crate that does something similar to this, but with proc macros: https://crates.io/crates/async-generic. Looks like it may still be worth layering a few regular macros on top, for when async-generic functions call other async-generic functions.