bitreq: use Duration for Request::with_timeout#642
Open
luisschwab wants to merge 1 commit into
Open
Conversation
tnull
reviewed
Jun 24, 2026
tnull
left a comment
Collaborator
There was a problem hiding this comment.
Generally makes sense to me.
| let secs = self.timeout.as_secs(); | ||
| if secs == 0 && self.timeout > Duration::from_secs(0) { | ||
| 1 | ||
| Duration::from_secs(1) |
Collaborator
There was a problem hiding this comment.
Codex:
- [P1] /home/tnull/workspace/corepc-pr-642/jsonrpc/Cargo.toml:41 still allows bitreq = "0.3.5", but jsonrpc now calls the new with_timeout(Duration) API. Published or locked downstream builds can still resolve an older bitreq with with_timeout(u64) and fail to compile when bitreq_http or
bitreq_http_async is enabled. Bump the dependency to the first bitreq release containing this breaking API, likely alongside a bitreq version bump.
Author
There was a problem hiding this comment.
Should we bump bitreq to v0.3.8 (or maybe to v0.4.0, since this is a breaking change, although minimal) in this same PR?
Bumping bitreq to v0.3.7 on jsonrpc would be of no effect, since this change is still unreleased.
Member
There was a problem hiding this comment.
Easier to keep track of that way imo, but up to you.
dfdaf26 to
c5e4d78
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #641
Uses
DurationforReqwest::with_timeout, sinceu64leaves a bit of room for doubt.