From eced57088207f27a4b4a81d7b6149cff78f57bf9 Mon Sep 17 00:00:00 2001 From: Kang Seonghoon Date: Fri, 17 Apr 2015 01:28:31 +0900 Subject: [PATCH] 0.2.11: language changes. - Replaced `thread::scoped` with `thread::spawn` to cope with a rare de-stabilization event. - `#[deprecated]` is (ironically) deprecated with user crates. All uses of them have been replaced by doc comments. --- Cargo.toml | 2 +- README.md | 2 +- src/datetime.rs | 8 +++----- src/lib.rs | 2 +- src/naive/datetime.rs | 9 +++------ 5 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 7548b22..ba0ea56 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chrono" -version = "0.2.10" +version = "0.2.11" authors = ["Kang Seonghoon "] description = "Date and time library for Rust" diff --git a/README.md b/README.md index 2bcd2d6..0458e38 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[Chrono][doc] 0.2.10 +[Chrono][doc] 0.2.11 ==================== [![Chrono on Travis CI][travis-image]][travis] diff --git a/src/datetime.rs b/src/datetime.rs index 08b296b..b898b01 100644 --- a/src/datetime.rs +++ b/src/datetime.rs @@ -59,9 +59,8 @@ impl DateTime { self.datetime.timestamp() } - /// Same to `DateTime::timestamp`. + /// *Deprecated*: Same to `DateTime::timestamp`. #[inline] - #[deprecated = "Use `DateTime::timestamp` instead."] pub fn num_seconds_from_unix_epoch(&self) -> i64 { self.timestamp() } @@ -499,7 +498,6 @@ mod tests { } #[test] - #[ignore] // XXX Rust issue #22818 fn test_datetime_is_copy() { // UTC is known to be `Copy`. let a = UTC::now(); @@ -513,9 +511,9 @@ mod tests { // UTC is known to be `Send`. let a = UTC::now(); - thread::scoped(move || { + thread::spawn(move || { let _ = a; - }).join(); + }).join().unwrap(); } } diff --git a/src/lib.rs b/src/lib.rs index c1aa68a..6c24fc5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ /*! -# Chrono 0.2.10 +# Chrono 0.2.11 Date and time handling for Rust. (also known as `rust-chrono`) It aims to be a feature-complete superset of the [time](https://github.com/rust-lang/time) library. diff --git a/src/naive/datetime.rs b/src/naive/datetime.rs index 33663f7..3a5d5eb 100644 --- a/src/naive/datetime.rs +++ b/src/naive/datetime.rs @@ -61,16 +61,14 @@ impl NaiveDateTime { } } - /// Same to `NaiveDateTime::from_timestamp`. + /// *Deprecated:* Same to `NaiveDateTime::from_timestamp`. #[inline] - #[deprecated = "Use `NaiveDateTime::from_timestamp` instead."] pub fn from_num_seconds_from_unix_epoch(secs: i64, nsecs: u32) -> NaiveDateTime { NaiveDateTime::from_timestamp(secs, nsecs) } - /// Same to `NaiveDateTime::from_timestamp_opt`. + /// *Deprecated:* Same to `NaiveDateTime::from_timestamp_opt`. #[inline] - #[deprecated = "Use `NaiveDateTime::from_timestamp` instead."] pub fn from_num_seconds_from_unix_epoch_opt(secs: i64, nsecs: u32) -> Option { NaiveDateTime::from_timestamp_opt(secs, nsecs) } @@ -105,9 +103,8 @@ impl NaiveDateTime { (ndays - 719163) * 86400 + nseconds } - /// Same to `NaiveDateTime::timestamp`. + /// *Deprecated:* Same to `NaiveDateTime::timestamp`. #[inline] - #[deprecated = "Use `NaiveDateTime::timestamp` instead."] pub fn num_seconds_from_unix_epoch(&self) -> i64 { self.timestamp() }