mirror of
https://github.com/chronotope/chrono.git
synced 2025-09-26 20:40:51 +00:00
Use result in doctest
This commit is contained in:
parent
becc22219d
commit
8bd13db242
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user