about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-29 18:54:05 +0100
committerGitHub <noreply@github.com>2020-02-29 18:54:05 +0100
commitcf48ca6170066602095b33e0f740d40e0d1c0836 (patch)
treeedb1a401c592f3b7d182ea11289f7cefd9e23058 /src/libstd
parent015bb74650f80de4411b8d12d897fad9ed35a915 (diff)
parent435de171a3a6ae5e41bf22e00e030654a557400c (diff)
downloadrust-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.rs2
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
     ///