Skip to content

Commit cf48ca6

Browse files
authored
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.
2 parents 015bb74 + 435de17 commit cf48ca6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libstd/time.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl Instant {
284284
}
285285

286286
/// Returns the amount of time elapsed from another instant to this one,
287-
/// or zero duration if that instant is earlier than this one.
287+
/// or zero duration if that instant is later than this one.
288288
///
289289
/// # Examples
290290
///

0 commit comments

Comments
 (0)