Upgrade bincode dev-dependency to >=1.0.0-alpha6.

The test depends on the bincode API changed at that version.
This commit is contained in:
Kang Seonghoon 2017-04-19 00:34:10 +09:00
parent 06810bc573
commit 1583df95b5
No known key found for this signature in database
GPG Key ID: 82440FABA6709020
5 changed files with 9 additions and 9 deletions

View File

@ -27,4 +27,4 @@ serde = { version = "0.9", optional = true }
[dev-dependencies]
serde_json = { version = ">=0.9.0" }
bincode = { version = "1.0.0-alpha2", features = ["serde"], default-features = false }
bincode = { version = "1.0.0-alpha6", features = ["serde"], default-features = false }

View File

@ -584,10 +584,10 @@ mod serde {
fn test_serde_bincode() {
// Bincode is relevant to test separately from JSON because
// it is not self-describing.
use self::bincode::{SizeLimit, serialize, deserialize};
use self::bincode::{Infinite, serialize, deserialize};
let dt = UTC.ymd(2014, 7, 24).and_hms(12, 34, 6);
let encoded = serialize(&dt, SizeLimit::Infinite).unwrap();
let encoded = serialize(&dt, Infinite).unwrap();
let decoded: DateTime<UTC> = deserialize(&encoded).unwrap();
assert_eq!(dt, decoded);
assert_eq!(dt.offset(), decoded.offset());

View File

@ -1616,10 +1616,10 @@ mod serde {
fn test_serde_bincode() {
// Bincode is relevant to test separately from JSON because
// it is not self-describing.
use self::bincode::{SizeLimit, serialize, deserialize};
use self::bincode::{Infinite, serialize, deserialize};
let d = NaiveDate::from_ymd(2014, 7, 24);
let encoded = serialize(&d, SizeLimit::Infinite).unwrap();
let encoded = serialize(&d, Infinite).unwrap();
let decoded: NaiveDate = deserialize(&encoded).unwrap();
assert_eq!(d, decoded);
}

View File

@ -1515,10 +1515,10 @@ mod serde {
// Bincode is relevant to test separately from JSON because
// it is not self-describing.
use naive::date::NaiveDate;
use self::bincode::{SizeLimit, serialize, deserialize};
use self::bincode::{Infinite, serialize, deserialize};
let dt = NaiveDate::from_ymd(2016, 7, 8).and_hms_milli(9, 10, 48, 90);
let encoded = serialize(&dt, SizeLimit::Infinite).unwrap();
let encoded = serialize(&dt, Infinite).unwrap();
let decoded: NaiveDateTime = deserialize(&encoded).unwrap();
assert_eq!(dt, decoded);
}

View File

@ -1392,10 +1392,10 @@ mod serde {
fn test_serde_bincode() {
// Bincode is relevant to test separately from JSON because
// it is not self-describing.
use self::bincode::{SizeLimit, serialize, deserialize};
use self::bincode::{Infinite, serialize, deserialize};
let t = NaiveTime::from_hms_nano(3, 5, 7, 98765432);
let encoded = serialize(&t, SizeLimit::Infinite).unwrap();
let encoded = serialize(&t, Infinite).unwrap();
let decoded: NaiveTime = deserialize(&encoded).unwrap();
assert_eq!(t, decoded);
}