Skip to content

Commit c458627

Browse files
authored
Improve panic docs for Instant::duration_since
The docs for Instant::duration_since has a confusing section on panicking. It's much more clear without the second two sentences of description.
1 parent a783fe2 commit c458627

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/libstd/time/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ impl Instant {
163163
///
164164
/// # Panics
165165
///
166-
/// This function will panic if `earlier` is later than `self`, which should
167-
/// only be possible if `earlier` was created after `self`. Because
168-
/// `Instant` is monotonic, the only time that this should happen should be
169-
/// a bug.
166+
/// This function will panic if `earlier` is later than `self`.
170167
///
171168
/// # Examples
172169
///

0 commit comments

Comments
 (0)