diff options
author | Haibo Huang <hhb@google.com> | 2020-12-15 19:28:29 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-12-15 19:28:29 +0000 |
commit | 580aaf1f60552534148aaf4ece913bc550515762 (patch) | |
tree | 03447d70ccead80984e1c6bde74d6b8a41457c56 | |
parent | 63fd7e132069550fc519cbb2d8f1a24452fd8437 (diff) | |
parent | 7b337ff42cd1ca2fd71a79245b1f7eb591e9ba2e (diff) | |
download | serde-580aaf1f60552534148aaf4ece913bc550515762.tar.gz |
Merge "Upgrade rust/crates/serde to 1.0.118" am: 0669df4576 am: 7b337ff42c
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/serde/+/1520521
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ibcd9a09cf5bd7a6f884e83d7bd6c0b806e72ed41
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Cargo.toml | 4 | ||||
-rw-r--r-- | Cargo.toml.orig | 4 | ||||
-rw-r--r-- | METADATA | 8 | ||||
-rw-r--r-- | src/de/impls.rs | 15 | ||||
-rw-r--r-- | src/lib.rs | 6 | ||||
-rw-r--r-- | src/ser/impls.rs | 1 |
7 files changed, 16 insertions, 24 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index 8e3161d..99b51b4 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,5 @@ { "git": { - "sha1": "fc3f104c4a08a85b403c468348347240db6cc992" + "sha1": "e7974312681c9c1c54f7586e86b0d7013b350a54" } } @@ -12,7 +12,7 @@ [package] name = "serde" -version = "1.0.117" +version = "1.0.118" authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"] build = "build.rs" include = ["build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] @@ -30,7 +30,7 @@ targets = ["x86_64-unknown-linux-gnu"] [package.metadata.playground] features = ["derive", "rc"] [dependencies.serde_derive] -version = "=1.0.117" +version = "=1.0.118" optional = true [dev-dependencies.serde_derive] version = "1.0" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 5fc7a37..a04ee8e 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "serde" -version = "1.0.117" # remember to update html_root_url and serde_derive dependency +version = "1.0.118" # remember to update html_root_url and serde_derive dependency authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"] license = "MIT OR Apache-2.0" description = "A generic serialization/deserialization framework" @@ -14,7 +14,7 @@ include = ["build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APAC build = "build.rs" [dependencies] -serde_derive = { version = "=1.0.117", optional = true, path = "../serde_derive" } +serde_derive = { version = "=1.0.118", optional = true, path = "../serde_derive" } [dev-dependencies] serde_derive = { version = "1.0", path = "../serde_derive" } @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/serde/serde-1.0.117.crate" + value: "https://static.crates.io/crates/serde/serde-1.0.118.crate" } - version: "1.0.117" + version: "1.0.118" license_type: NOTICE last_upgrade_date { year: 2020 - month: 10 - day: 26 + month: 12 + day: 7 } } diff --git a/src/de/impls.rs b/src/de/impls.rs index ae4f9dc..d9af210 100644 --- a/src/de/impls.rs +++ b/src/de/impls.rs @@ -1871,7 +1871,7 @@ impl<'de> Deserialize<'de> for Duration { enum Field { Secs, Nanos, - }; + } impl<'de> Deserialize<'de> for Field { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> @@ -1996,7 +1996,7 @@ impl<'de> Deserialize<'de> for SystemTime { enum Field { Secs, Nanos, - }; + } impl<'de> Deserialize<'de> for Field { fn deserialize<D>(deserializer: D) -> Result<Self, D::Error> @@ -2334,10 +2334,7 @@ where 0 => Ok(Field::Unbounded), 1 => Ok(Field::Included), 2 => Ok(Field::Excluded), - _ => Err(Error::invalid_value( - Unexpected::Unsigned(value), - &self, - )), + _ => Err(Error::invalid_value(Unexpected::Unsigned(value), &self)), } } @@ -2499,10 +2496,7 @@ where match value { 0 => Ok(Field::Ok), 1 => Ok(Field::Err), - _ => Err(Error::invalid_value( - Unexpected::Unsigned(value), - &self, - )), + _ => Err(Error::invalid_value(Unexpected::Unsigned(value), &self)), } } @@ -2570,7 +2564,6 @@ where //////////////////////////////////////////////////////////////////////////////// -#[cfg(feature = "std")] impl<'de, T> Deserialize<'de> for Wrapping<T> where T: Deserialize<'de>, @@ -82,7 +82,7 @@ //////////////////////////////////////////////////////////////////////////////// // Serde types in rustdoc of other crates get linked to here. -#![doc(html_root_url = "https://docs.rs/serde/1.0.117")] +#![doc(html_root_url = "https://docs.rs/serde/1.0.118")] // Support using Serde without the standard library! #![cfg_attr(not(feature = "std"), no_std)] // Unstable functionality only if the user asks for it. For tracking and @@ -119,6 +119,7 @@ // correctly used enum_glob_use, map_err_ignore, + result_unit_err, wildcard_imports, // not practical needless_pass_by_value, @@ -165,6 +166,7 @@ mod lib { pub use self::core::default::{self, Default}; pub use self::core::fmt::{self, Debug, Display}; pub use self::core::marker::{self, PhantomData}; + pub use self::core::num::Wrapping; pub use self::core::ops::Range; pub use self::core::option::{self, Option}; pub use self::core::result::{self, Result}; @@ -216,8 +218,6 @@ mod lib { #[cfg(feature = "std")] pub use std::io::Write; #[cfg(feature = "std")] - pub use std::num::Wrapping; - #[cfg(feature = "std")] pub use std::path::{Path, PathBuf}; #[cfg(feature = "std")] pub use std::sync::{Mutex, RwLock}; diff --git a/src/ser/impls.rs b/src/ser/impls.rs index 40e48ba..431a478 100644 --- a/src/ser/impls.rs +++ b/src/ser/impls.rs @@ -824,7 +824,6 @@ impl Serialize for OsString { //////////////////////////////////////////////////////////////////////////////// -#[cfg(feature = "std")] impl<T> Serialize for Wrapping<T> where T: Serialize, |