Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

native/date: Improve DelayedFormat doc re Panics #1590

Merged
merged 1 commit into from
Jun 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading