]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #42597 - mark-buer:park_timeout_example_fix, r=alexcrichton
authorCorey Farwell <coreyf@rwell.org>
Tue, 13 Jun 2017 21:15:02 +0000 (17:15 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Jun 2017 21:15:02 +0000 (17:15 -0400)
Capture elapsed duration in Thread::park_timeout example

`beginning_park.elapsed()` might return a larger value within the loop as compared to that checked in the loop conditional.
Since `Duration` arithmetic is checked, hitting such an edge case will cause a panic.


Trivial merge