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.
This commit is contained in:
Kang Seonghoon 2015-04-17 01:28:31 +09:00
parent 7fd0cf124a
commit eced570882
5 changed files with 9 additions and 14 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "chrono"
version = "0.2.10"
version = "0.2.11"
authors = ["Kang Seonghoon <public+rust@mearie.org>"]
description = "Date and time library for Rust"

View File

@ -1,4 +1,4 @@
[Chrono][doc] 0.2.10
[Chrono][doc] 0.2.11
====================
[![Chrono on Travis CI][travis-image]][travis]

View File

@ -59,9 +59,8 @@ impl<Tz: TimeZone> DateTime<Tz> {
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();
}
}

View File

@ -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.

View File

@ -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> {
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()
}