Skip to content

Commit

Permalink
native/date: Improve DelayedFormat doc re Panics
Browse files Browse the repository at this point in the history
  • Loading branch information
Behnam Esfahbod authored and djc committed Jun 11, 2024
1 parent 2085627 commit de2f1f4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/naive/date/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1200,9 +1200,11 @@ impl NaiveDate {
/// or just feed it into `print!` and other formatting macros.
/// (In this way it avoids the redundant memory allocation.)
///
/// A wrong format string does *not* issue an error immediately.
/// Rather, converting or formatting the `DelayedFormat` fails.
/// You are recommended to immediately use `DelayedFormat` for this reason.
/// # Panics
///
/// Converting or formatting the returned `DelayedFormat` panics if the format string is wrong.
/// Because of this delayed failure, you are recommended to immediately use the `DelayedFormat`
/// value.
///
/// # Example
///
Expand Down

0 comments on commit de2f1f4

Please sign in to comment.