This repository was archived by the owner on Sep 4, 2024. It is now read-only.
conditional compilation for async roundtripper#35
Open
gregdhill wants to merge 1 commit intoapoelstra:masterfrom
Open
conditional compilation for async roundtripper#35gregdhill wants to merge 1 commit intoapoelstra:masterfrom
gregdhill wants to merge 1 commit intoapoelstra:masterfrom
Conversation
dpc
reviewed
Oct 9, 2020
src/client.rs
Outdated
|
|
||
| /// Make an HTTP request. In practice only POST request will be made. | ||
| /// Make a synchronous HTTP request. In practice only POST request will be made. | ||
| #[cfg(not(feature = "async"))] |
Contributor
There was a problem hiding this comment.
Just skimming, but if I understand correctly, the following would be my recommendations:
A PR like that should name async functions differently, and keep the sync versions available even when the feature is enabled. Otherwise multiple libraries might pull in jsonrpc, and then if one uses async it would break the one that doesn't.
And despite that - just because I need async in one place of the code, doesn't mean I won't need a sync version in other.
Author
There was a problem hiding this comment.
Good points! I've updated the PR, although there is a bit of code duplication now.
b20149d to
35cbdf7
Compare
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Owner
|
You'll probably need to mess around with Travis to avoid testing this feature on Rust 1.21. (Also, that should be 1.29 now... see #33 ) |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Signed-off-by: Gregory Hill gregorydhill@outlook.com
Adds conditional compilation for optional async roundtripper. Required for rust-bitcoincore-rpc.