Skip to content

Commit

Permalink
Improve panic docs for Instant::duration_since
Browse files Browse the repository at this point in the history
The docs for Instant::duration_since has a confusing section on panicking. It's
much more clear without the second two sentences of description.
  • Loading branch information
Others committed Jul 15, 2017
1 parent a783fe2 commit c458627
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/libstd/time/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,7 @@ impl Instant {
///
/// # Panics
///
/// This function will panic if `earlier` is later than `self`, which should
/// only be possible if `earlier` was created after `self`. Because
/// `Instant` is monotonic, the only time that this should happen should be
/// a bug.
/// This function will panic if `earlier` is later than `self`.
///
/// # Examples
///
Expand Down

0 comments on commit c458627

Please sign in to comment.