0.2.25: Fixed warnings from 0.2.24. Duh.
This commit is contained in:
parent
603ac1bc1c
commit
cb9fd7fbe1
|
@ -8,7 +8,10 @@ Chrono obeys the principle of [Semantic Versioning](http://semver.org/).
|
|||
There were/are numerous minor versions before 1.0 due to the language changes.
|
||||
Versions with only mechnical changes will be omitted from the following list.
|
||||
|
||||
## 0.2.24 (2016-08-04)
|
||||
## 0.2.25 (2016-08-04)
|
||||
|
||||
(0.2.24 was accidentally uploaded without a proper check for warnings in the default state,
|
||||
and replaced by 0.2.25 very shortly. Duh.)
|
||||
|
||||
### Added
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "chrono"
|
||||
version = "0.2.24"
|
||||
version = "0.2.25"
|
||||
authors = ["Kang Seonghoon <public+rust@mearie.org>"]
|
||||
|
||||
description = "Date and time library for Rust"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
[Chrono][doc] 0.2.24
|
||||
[Chrono][doc] 0.2.25
|
||||
====================
|
||||
|
||||
[![Chrono on Travis CI][travis-image]][travis]
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Copyright (c) 2014-2015, Kang Seonghoon.
|
||||
// See README.md and LICENSE.txt for details.
|
||||
|
||||
//! # Chrono 0.2.24
|
||||
//! # Chrono 0.2.25
|
||||
//!
|
||||
//! Date and time handling for Rust. (also known as `rust-chrono`)
|
||||
//! It aims to be a feature-complete superset of
|
||||
|
|
|
@ -129,6 +129,7 @@ impl NaiveDate {
|
|||
|
||||
/// Makes a new `NaiveDate` from the serialized representation.
|
||||
/// Used for serialization formats.
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
fn from_serialized(ymdf: i32) -> Option<NaiveDate> {
|
||||
// check if the year flag is correct
|
||||
if (ymdf & 0b1111) as u8 != YearFlags::from_year(ymdf >> 13).0 { return None; }
|
||||
|
@ -141,6 +142,7 @@ impl NaiveDate {
|
|||
}
|
||||
|
||||
/// Returns a serialized representation of this `NaiveDate`.
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
fn to_serialized(&self) -> i32 {
|
||||
self.ymdf
|
||||
}
|
||||
|
|
|
@ -66,6 +66,7 @@ pub struct NaiveTime {
|
|||
impl NaiveTime {
|
||||
/// Makes a new `NaiveTime` from the serialized representation.
|
||||
/// Used for serialization formats.
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
fn from_serialized(secs: u32, frac: u32) -> Option<NaiveTime> {
|
||||
// check if the values are in the range
|
||||
if secs >= 86400 { return None; }
|
||||
|
@ -76,6 +77,7 @@ impl NaiveTime {
|
|||
}
|
||||
|
||||
/// Returns a serialized representation of this `NaiveDate`.
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
fn to_serialized(&self) -> (u32, u32) {
|
||||
(self.secs, self.frac)
|
||||
}
|
||||
|
|
|
@ -23,6 +23,7 @@ pub struct FixedOffset {
|
|||
impl FixedOffset {
|
||||
/// Makes a new `FixedOffset` from the serialized representation.
|
||||
/// Used for serialization formats.
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
fn from_serialized(secs: i32) -> Option<FixedOffset> {
|
||||
// check if the values are in the range
|
||||
if secs <= -86400 || 86400 <= secs { return None; }
|
||||
|
@ -32,6 +33,7 @@ impl FixedOffset {
|
|||
}
|
||||
|
||||
/// Returns a serialized representation of this `FixedOffset`.
|
||||
#[cfg(feature = "rustc-serialize")]
|
||||
fn to_serialized(&self) -> i32 {
|
||||
self.local_minus_utc
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue