Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update serde version to one that supports 128-bit integers #226

Merged
merged 1 commit into from
May 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ version = "0.5.2"
license = "MIT/Apache-2.0"
keywords = ["parser", "serde", "serialization"]
authors = [
"Christopher Durham <cad97@cad97.com>",
"Dzmitry Malyshau <kvarkus@gmail.com>",
"Thomas Schaller <torkleyy@gmail.com>",
]
Expand All @@ -21,9 +22,9 @@ name = "ron"

[dependencies]
base64 = "0.12"
bitflags = "1"
bitflags = "1.0.4"
indexmap = { version = "1.0.2", features = ["serde-1"], optional = true }
serde = { version = "1", features = ["serde_derive"] }
serde = { version = "1.0.60", features = ["serde_derive"] }

[dev-dependencies]
serde_bytes = "0.11"
Expand Down
3 changes: 1 addition & 2 deletions src/extensions.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use bitflags::bitflags;
use serde::{Deserialize, Serialize};

bitflags! {
bitflags::bitflags! {
#[derive(Serialize, Deserialize)]
pub struct Extensions: usize {
const UNWRAP_NEWTYPES = 0x1;
Expand Down
20 changes: 10 additions & 10 deletions tests/struct_integers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ struct S {
#[test]
fn roundtrip() {
let s = S {
a: i8::MIN,
b: i16::MIN,
c: i32::MIN,
d: i64::MIN,
e: i128::MIN,
f: u8::MAX,
g: u16::MAX,
h: u32::MAX,
i: u64::MAX,
j: u128::MAX,
a: std::i8::MIN,
b: std::i16::MIN,
c: std::i32::MIN,
d: std::i64::MIN,
e: std::i128::MIN,
f: std::u8::MAX,
g: std::u16::MAX,
h: std::u32::MAX,
i: std::u64::MAX,
j: std::u128::MAX,
};
let serialized = ron::ser::to_string(&s).unwrap();
dbg!(&serialized);
Expand Down