Skip to content

Commit cf17f7a

Browse files
committed
Remove deprecated methods from documentation
1 parent 3e6fa4c commit cf17f7a

File tree

4 files changed

+5
-12
lines changed

4 files changed

+5
-12
lines changed

src/lib.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@
260260
//! # }
261261
//! ```
262262
//!
263-
//! Parsing can be done with three methods:
263+
//! Parsing can be done with two methods:
264264
//!
265265
//! 1. The standard [`FromStr`](https://doc.rust-lang.org/std/str/trait.FromStr.html) trait
266266
//! (and [`parse`](https://doc.rust-lang.org/std/primitive.str.html#method.parse) method
@@ -278,12 +278,6 @@
278278
//! [`DateTime::parse_from_rfc3339`](./struct.DateTime.html#method.parse_from_rfc3339)
279279
//! are similar but for well-known formats.
280280
//!
281-
//! 3. [`Offset::datetime_from_str`](./offset/trait.TimeZone.html#method.datetime_from_str) is
282-
//! similar but returns `DateTime` of given offset.
283-
//! When the explicit offset is missing from the input, it simply uses given offset.
284-
//! It issues an error when the input contains an explicit offset different
285-
//! from the current offset.
286-
//!
287281
//! More detailed control over the parsing process is available via
288282
//! [`format`](./format/index.html) module.
289283
//!

src/naive/date.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ impl Datelike for NaiveDate {
15561556
/// assert_eq!(NaiveDate::from_ymd_opt(-308, 3, 14).unwrap().day(), 14);
15571557
/// ```
15581558
///
1559-
/// Combined with [`NaiveDate::pred`](#method.pred),
1559+
/// Combined with [`NaiveDate::pred_opt`](#method.pred_opt),
15601560
/// one can determine the number of days in a particular month.
15611561
/// (Note that this panics when `year` is out of range.)
15621562
///
@@ -1613,7 +1613,7 @@ impl Datelike for NaiveDate {
16131613
/// assert_eq!(NaiveDate::from_ymd_opt(-308, 3, 14).unwrap().ordinal(), 74);
16141614
/// ```
16151615
///
1616-
/// Combined with [`NaiveDate::pred`](#method.pred),
1616+
/// Combined with [`NaiveDate::pred_opt`](#method.pred_opt),
16171617
/// one can determine the number of days in a particular year.
16181618
/// (Note that this panics when `year` is out of range.)
16191619
///

src/offset/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,7 @@ pub trait TimeZone: Sized + Clone {
423423
/// Makes a new `DateTime` from the number of non-leap nanoseconds
424424
/// since January 1, 1970 0:00:00 UTC (aka "UNIX timestamp").
425425
///
426-
/// Unlike [`timestamp_millis`](#method.timestamp_millis), this never
427-
/// panics.
426+
/// Unlike [`timestamp_millis_opt`](#method.timestamp_millis_opt), this never fails.
428427
///
429428
/// # Example
430429
///

src/round.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ const fn span_for_digits(digits: u16) -> u32 {
9797
///
9898
/// # Limitations
9999
/// Both rounding and truncating are done via [`Duration::num_nanoseconds`] and
100-
/// [`DateTime::timestamp_nanos`]. This means that they will fail if either the
100+
/// [`DateTime::timestamp_nanos_opt`]. This means that they will fail if either the
101101
/// `Duration` or the `DateTime` are too big to represented as nanoseconds. They
102102
/// will also fail if the `Duration` is bigger than the timestamp.
103103
pub trait DurationRound: Sized {

0 commit comments

Comments
 (0)