Skip to content

Commit

Permalink
Rollup merge of rust-lang#69584 - zantysor:fix-saturating-duration-si…
Browse files Browse the repository at this point in the history
…nce-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.
  • Loading branch information
Dylan-DPC authored Feb 29, 2020
2 parents 015bb74 + 435de17 commit cf48ca6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
///
Expand Down

0 comments on commit cf48ca6

Please sign in to comment.