Try to avoid panics on buggy (?) clocks#8114
Merged
bors merged 1 commit intorust-lang:masterfrom Apr 15, 2020
Merged
Conversation
Try to avoid panics with `Instant` by only performing infallible operations. This tweaks a comparison located in rust-lang#8042 to use `Instant` comparisons rather than `Duration` comparisons which should hopefully eliminate a source of panics in the face of buggy (maybe?) clocks. I'm not sure whether this actually fixes the original issue, but seeing that we have a pretty low chance of the issue recurring, it's probably fine to go ahead and say... Closes rust-lang#8042
|
r? @Eh2406 (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
|
@bors r+ |
Contributor
|
📌 Commit be020a5 has been approved by |
Contributor
Contributor
|
☀️ Test successful - checks-azure |
Dylan-DPC-zz
pushed a commit
to Dylan-DPC-zz/rust
that referenced
this pull request
Apr 16, 2020
Update cargo 3 commits in 74e3a7d5b756d7c0e94399fc29fcd154e792c22a..ebda5065ee8a1e46801380abcbac21a25bc7e755 2020-04-13 20:41:52 +0000 to 2020-04-16 14:28:43 +0000 - Don't use debug display for error object. (rust-lang/cargo#8119) - Add backwards-compatibility for old cargo-tree flags. (rust-lang/cargo#8115) - Try to avoid panics on buggy (?) clocks (rust-lang/cargo#8114)
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.
Try to avoid panics with
Instantby only performing infallibleoperations. This tweaks a comparison located in #8042 to use
Instantcomparisons rather than
Durationcomparisons which should hopefullyeliminate a source of panics in the face of buggy (maybe?) clocks.
I'm not sure whether this actually fixes the original issue, but seeing
that we have a pretty low chance of the issue recurring, it's probably
fine to go ahead and say...
Closes #8042