mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-27 20:27:57 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cc865ac523 | |||
| 2d973c1805 | |||
| 6ca499b2dd |
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.199"
|
version = "1.0.200"
|
||||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
categories = ["encoding", "no-std", "no-std::no-alloc"]
|
categories = ["encoding", "no-std", "no-std::no-alloc"]
|
||||||
@@ -37,7 +37,7 @@ rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"]
|
|||||||
# is compatible with exactly one serde release because the generated code
|
# is compatible with exactly one serde release because the generated code
|
||||||
# involves nonpublic APIs which are not bound by semver.
|
# involves nonpublic APIs which are not bound by semver.
|
||||||
[target.'cfg(any())'.dependencies]
|
[target.'cfg(any())'.dependencies]
|
||||||
serde_derive = { version = "=1.0.199", path = "../serde_derive" }
|
serde_derive = { version = "=1.0.200", path = "../serde_derive" }
|
||||||
|
|
||||||
|
|
||||||
### FEATURES #################################################################
|
### FEATURES #################################################################
|
||||||
|
|||||||
+11
-7
@@ -2312,13 +2312,17 @@ impl Display for WithDecimalPoint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut writer = LookForDecimalPoint {
|
if self.0.is_finite() {
|
||||||
formatter,
|
let mut writer = LookForDecimalPoint {
|
||||||
has_decimal_point: false,
|
formatter,
|
||||||
};
|
has_decimal_point: false,
|
||||||
tri!(write!(writer, "{}", self.0));
|
};
|
||||||
if !writer.has_decimal_point {
|
tri!(write!(writer, "{}", self.0));
|
||||||
tri!(formatter.write_str(".0"));
|
if !writer.has_decimal_point {
|
||||||
|
tri!(formatter.write_str(".0"));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tri!(write!(formatter, "{}", self.0));
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -95,7 +95,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Serde types in rustdoc of other crates get linked to here.
|
// Serde types in rustdoc of other crates get linked to here.
|
||||||
#![doc(html_root_url = "https://docs.rs/serde/1.0.199")]
|
#![doc(html_root_url = "https://docs.rs/serde/1.0.200")]
|
||||||
// Support using Serde without the standard library!
|
// Support using Serde without the standard library!
|
||||||
#![cfg_attr(not(feature = "std"), no_std)]
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
// Show which crate feature enables conditionally compiled APIs in documentation.
|
// Show which crate feature enables conditionally compiled APIs in documentation.
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.199"
|
version = "1.0.200"
|
||||||
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
|
||||||
categories = ["no-std", "no-std::no-alloc"]
|
categories = ["no-std", "no-std::no-alloc"]
|
||||||
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
|
description = "Macros 1.1 implementation of #[derive(Serialize, Deserialize)]"
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
//!
|
//!
|
||||||
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
|
//! [https://serde.rs/derive.html]: https://serde.rs/derive.html
|
||||||
|
|
||||||
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.199")]
|
#![doc(html_root_url = "https://docs.rs/serde_derive/1.0.200")]
|
||||||
// Ignored clippy lints
|
// Ignored clippy lints
|
||||||
#![allow(
|
#![allow(
|
||||||
// clippy false positive: https://github.com/rust-lang/rust-clippy/issues/7054
|
// clippy false positive: https://github.com/rust-lang/rust-clippy/issues/7054
|
||||||
|
|||||||
@@ -1438,6 +1438,14 @@ fn test_integer_from_float() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_nan_no_decimal_point() {
|
||||||
|
assert_de_tokens_error::<isize>(
|
||||||
|
&[Token::F32(f32::NAN)],
|
||||||
|
"invalid type: floating point `NaN`, expected isize",
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_unit_struct_from_seq() {
|
fn test_unit_struct_from_seq() {
|
||||||
assert_de_tokens_error::<UnitStruct>(
|
assert_de_tokens_error::<UnitStruct>(
|
||||||
|
|||||||
Reference in New Issue
Block a user