@@ -1238,7 +1238,7 @@ pub mod ts_seconds_option {
12381238/// delta: TimeDelta,
12391239/// }
12401240///
1241- /// let time = TimeDelta::nanoseconds(2018517);
1241+ /// let delta = TimeDelta::nanoseconds(2018517);
12421242/// let my_s = S { delta: delta.clone() };
12431243///
12441244/// let as_string = serde_json::to_string(&my_s)?;
@@ -1351,7 +1351,7 @@ pub mod td_nanoseconds {
13511351/// # Example:
13521352///
13531353/// ```rust
1354- /// # use chrono::Delta ;
1354+ /// # use chrono::TimeDelta ;
13551355/// # use serde_derive::{Deserialize, Serialize};
13561356/// use chrono::serde::td_nanoseconds_option;
13571357/// #[derive(Deserialize, Serialize)]
@@ -1401,7 +1401,7 @@ pub mod td_nanoseconds_option {
14011401 /// delta: Some(TimeDelta::nanoseconds(2018517)),
14021402 /// };
14031403 /// let as_string = serde_json::to_string(&my_s)?;
1404- /// assert_eq!(as_string, r#"{"time ":2018517}"#);
1404+ /// assert_eq!(as_string, r#"{"delta ":2018517}"#);
14051405 /// # Ok::<(), serde_json::Error>(())
14061406 /// ```
14071407 pub fn serialize < S > ( opt : & Option < TimeDelta > , serializer : S ) -> Result < S :: Ok , S :: Error >
@@ -1433,7 +1433,7 @@ pub mod td_nanoseconds_option {
14331433 /// }
14341434 ///
14351435 /// let my_s: S = serde_json::from_str(r#"{ "delta": 2018517 }"#)?;
1436- /// assert_eq!(my_s, S { delta: TimeDelta::nanoseconds(2018517) });
1436+ /// assert_eq!(my_s, S { delta: Some( TimeDelta::nanoseconds(2018517) ) });
14371437 /// # Ok::<(), serde_json::Error>(())
14381438 /// ```
14391439 pub fn deserialize < ' de , D > ( d : D ) -> Result < Option < TimeDelta > , D :: Error >
@@ -1494,7 +1494,7 @@ pub mod td_nanoseconds_option {
14941494/// delta: TimeDelta,
14951495/// }
14961496///
1497- /// let time = TimeDelta::microseconds(2018517);
1497+ /// let delta = TimeDelta::microseconds(2018517);
14981498/// let my_s = S { delta: delta.clone() };
14991499///
15001500/// let as_string = serde_json::to_string(&my_s)?;
@@ -1607,7 +1607,7 @@ pub mod td_microseconds {
16071607/// # Example:
16081608///
16091609/// ```rust
1610- /// # use chrono::Delta ;
1610+ /// # use chrono::TimeDelta ;
16111611/// # use serde_derive::{Deserialize, Serialize};
16121612/// use chrono::serde::td_microseconds_option;
16131613/// #[derive(Deserialize, Serialize)]
@@ -1657,7 +1657,7 @@ pub mod td_microseconds_option {
16571657 /// delta: Some(TimeDelta::microseconds(2018517)),
16581658 /// };
16591659 /// let as_string = serde_json::to_string(&my_s)?;
1660- /// assert_eq!(as_string, r#"{"time ":2018517}"#);
1660+ /// assert_eq!(as_string, r#"{"delta ":2018517}"#);
16611661 /// # Ok::<(), serde_json::Error>(())
16621662 /// ```
16631663 pub fn serialize < S > ( opt : & Option < TimeDelta > , serializer : S ) -> Result < S :: Ok , S :: Error >
@@ -1689,7 +1689,7 @@ pub mod td_microseconds_option {
16891689 /// }
16901690 ///
16911691 /// let my_s: S = serde_json::from_str(r#"{ "delta": 2018517 }"#)?;
1692- /// assert_eq!(my_s, S { delta: TimeDelta::microseconds(2018517) });
1692+ /// assert_eq!(my_s, S { delta: Some( TimeDelta::microseconds(2018517) ) });
16931693 /// # Ok::<(), serde_json::Error>(())
16941694 /// ```
16951695 pub fn deserialize < ' de , D > ( d : D ) -> Result < Option < TimeDelta > , D :: Error >
@@ -1750,7 +1750,7 @@ pub mod td_microseconds_option {
17501750/// delta: TimeDelta,
17511751/// }
17521752///
1753- /// let time = TimeDelta::milliseconds(2018517);
1753+ /// let delta = TimeDelta::milliseconds(2018517);
17541754/// let my_s = S { delta: delta.clone() };
17551755///
17561756/// let as_string = serde_json::to_string(&my_s)?;
@@ -1861,7 +1861,7 @@ pub mod td_milliseconds {
18611861/// # Example:
18621862///
18631863/// ```rust
1864- /// # use chrono::Delta ;
1864+ /// # use chrono::TimeDelta ;
18651865/// # use serde_derive::{Deserialize, Serialize};
18661866/// use chrono::serde::td_milliseconds_option;
18671867/// #[derive(Deserialize, Serialize)]
@@ -1911,7 +1911,7 @@ pub mod td_milliseconds_option {
19111911 /// delta: Some(TimeDelta::milliseconds(2018517)),
19121912 /// };
19131913 /// let as_string = serde_json::to_string(&my_s)?;
1914- /// assert_eq!(as_string, r#"{"time ":2018517}"#);
1914+ /// assert_eq!(as_string, r#"{"delta ":2018517}"#);
19151915 /// # Ok::<(), serde_json::Error>(())
19161916 /// ```
19171917 pub fn serialize < S > ( opt : & Option < TimeDelta > , serializer : S ) -> Result < S :: Ok , S :: Error >
@@ -1941,7 +1941,7 @@ pub mod td_milliseconds_option {
19411941 /// }
19421942 ///
19431943 /// let my_s: S = serde_json::from_str(r#"{ "delta": 2018517 }"#)?;
1944- /// assert_eq!(my_s, S { delta: TimeDelta::milliseconds(2018517) });
1944+ /// assert_eq!(my_s, S { delta: Some( TimeDelta::milliseconds(2018517) ) });
19451945 /// # Ok::<(), serde_json::Error>(())
19461946 /// ```
19471947 pub fn deserialize < ' de , D > ( d : D ) -> Result < Option < TimeDelta > , D :: Error >
@@ -2002,7 +2002,7 @@ pub mod td_milliseconds_option {
20022002/// delta: TimeDelta,
20032003/// }
20042004///
2005- /// let time = TimeDelta::seconds(2018517);
2005+ /// let delta = TimeDelta::seconds(2018517);
20062006/// let my_s = S { delta: delta.clone() };
20072007///
20082008/// let as_string = serde_json::to_string(&my_s)?;
@@ -2113,7 +2113,7 @@ pub mod td_seconds {
21132113/// # Example:
21142114///
21152115/// ```rust
2116- /// # use chrono::Delta ;
2116+ /// # use chrono::TimeDelta ;
21172117/// # use serde_derive::{Deserialize, Serialize};
21182118/// use chrono::serde::td_seconds_option;
21192119/// #[derive(Deserialize, Serialize)]
@@ -2163,7 +2163,7 @@ pub mod td_seconds_option {
21632163 /// delta: Some(TimeDelta::seconds(2018517)),
21642164 /// };
21652165 /// let as_string = serde_json::to_string(&my_s)?;
2166- /// assert_eq!(as_string, r#"{"time ":2018517}"#);
2166+ /// assert_eq!(as_string, r#"{"delta ":2018517}"#);
21672167 /// # Ok::<(), serde_json::Error>(())
21682168 /// ```
21692169 pub fn serialize < S > ( opt : & Option < TimeDelta > , serializer : S ) -> Result < S :: Ok , S :: Error >
@@ -2193,7 +2193,7 @@ pub mod td_seconds_option {
21932193 /// }
21942194 ///
21952195 /// let my_s: S = serde_json::from_str(r#"{ "delta": 2018517 }"#)?;
2196- /// assert_eq!(my_s, S { delta: TimeDelta::seconds(2018517) });
2196+ /// assert_eq!(my_s, S { delta: Some( TimeDelta::seconds(2018517) ) });
21972197 /// # Ok::<(), serde_json::Error>(())
21982198 /// ```
21992199 pub fn deserialize < ' de , D > ( d : D ) -> Result < Option < TimeDelta > , D :: Error >
0 commit comments