Skip to content

Commit de2f1f4

Browse files
Behnam Esfahboddjc
Behnam Esfahbod
authored andcommitted
native/date: Improve DelayedFormat doc re Panics
1 parent 2085627 commit de2f1f4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/naive/date/mod.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,9 +1200,11 @@ impl NaiveDate {
12001200
/// or just feed it into `print!` and other formatting macros.
12011201
/// (In this way it avoids the redundant memory allocation.)
12021202
///
1203-
/// A wrong format string does *not* issue an error immediately.
1204-
/// Rather, converting or formatting the `DelayedFormat` fails.
1205-
/// You are recommended to immediately use `DelayedFormat` for this reason.
1203+
/// # Panics
1204+
///
1205+
/// Converting or formatting the returned `DelayedFormat` panics if the format string is wrong.
1206+
/// Because of this delayed failure, you are recommended to immediately use the `DelayedFormat`
1207+
/// value.
12061208
///
12071209
/// # Example
12081210
///

0 commit comments

Comments
 (0)