Skip to content

Commit

Permalink
Use result in doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
pitdicker authored and djc committed May 30, 2023
1 parent becc222 commit 8bd13db
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/format/parse.rs
Expand Up @@ -504,9 +504,10 @@ where
/// All of these examples are equivalent:
/// ```
/// # use chrono::{DateTime, offset::FixedOffset};
/// "2012-12-12T12:12:12Z".parse::<DateTime<FixedOffset>>();
/// "2012-12-12 12:12:12Z".parse::<DateTime<FixedOffset>>();
/// "2012- 12-12T12: 12:12Z".parse::<DateTime<FixedOffset>>();
/// "2012-12-12T12:12:12Z".parse::<DateTime<FixedOffset>>()?;
/// "2012-12-12 12:12:12Z".parse::<DateTime<FixedOffset>>()?;
/// "2012- 12-12T12: 12:12Z".parse::<DateTime<FixedOffset>>()?;
/// # Ok::<(), chrono::ParseError>(())
/// ```
impl str::FromStr for DateTime<FixedOffset> {
type Err = ParseError;
Expand Down

0 comments on commit 8bd13db

Please sign in to comment.