diff options
| author | Dylan DPC <dylan.dpc@gmail.com> | 2020-02-29 18:54:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-29 18:54:05 +0100 |
| commit | cf48ca6170066602095b33e0f740d40e0d1c0836 (patch) | |
| tree | edb1a401c592f3b7d182ea11289f7cefd9e23058 /src/libstd | |
| parent | 015bb74650f80de4411b8d12d897fad9ed35a915 (diff) | |
| parent | 435de171a3a6ae5e41bf22e00e030654a557400c (diff) | |
| download | rust-cf48ca6170066602095b33e0f740d40e0d1c0836.tar.gz rust-cf48ca6170066602095b33e0f740d40e0d1c0836.zip | |
Rollup merge of #69584 - zantysor:fix-saturating-duration-since-comment, r=varkor
Correct comment to match behavior Corrects the header comment on `saturating_duration_since` to match the behavior of returning 0 if the other timestamp is _later_ than the invocant, not earlier, This is purely a documentation change, so hopefully it doesn't require an issue; if it does, I'll open one and resubmit.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/time.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/time.rs b/src/libstd/time.rs index 68a54915873..c36e78b1d00 100644 --- a/src/libstd/time.rs +++ b/src/libstd/time.rs @@ -284,7 +284,7 @@ impl Instant { } /// Returns the amount of time elapsed from another instant to this one, - /// or zero duration if that instant is earlier than this one. + /// or zero duration if that instant is later than this one. /// /// # Examples /// |
