aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2022-12-19 17:09:59 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-12-19 17:09:59 +0000
commit4c6448f7b2802f7f9e9c0413b94578b74d9504f9 (patch)
treed3e5ac6b8bbf67385f3f9dfa4f79b617c458a738
parent47759145d61efde3fb05f5f052bbf17f991c4aab (diff)
parente08e9aa99f7ecd0749ac0a895b35e57b3b9cb1ff (diff)
downloadserde_test-4c6448f7b2802f7f9e9c0413b94578b74d9504f9.tar.gz
Upgrade serde_test to 1.0.151 am: 19984d76a7 am: 5b5bca94cc am: e08e9aa99f
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/serde_test/+/2363461 Change-Id: Ic45884b2ea69e03765f794dd6b8e7ee75766d505 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp7
-rw-r--r--Cargo.toml29
-rw-r--r--Cargo.toml.orig17
-rw-r--r--METADATA12
-rw-r--r--README.md2
-rw-r--r--build.rs6
-rw-r--r--src/assert.rs10
-rw-r--r--src/lib.rs4
9 files changed, 60 insertions, 29 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 6b622a5..db0ecf9 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "02bd79a0bada78dd88d050f6478806f001f41fb0"
+ "sha1": "44bf3633aff83a53f72bd0cad9f328b0192eae06"
},
"path_in_vcs": "serde_test"
} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 107a7b9..939c4b8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,11 +43,14 @@ rust_library {
host_supported: true,
crate_name: "serde_test",
cargo_env_compat: true,
- cargo_pkg_version: "1.0.136",
+ cargo_pkg_version: "1.0.151",
srcs: ["src/lib.rs"],
edition: "2015",
- cfgs: ["track_caller"],
rustlibs: [
"libserde",
],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
}
diff --git a/Cargo.toml b/Cargo.toml
index 3e4ea31..f6a050d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,23 +10,42 @@
# See Cargo.toml.orig for the original contents.
[package]
-rust-version = "1.15"
+rust-version = "1.13"
name = "serde_test"
-version = "1.0.136"
-authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
+version = "1.0.151"
+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"]
+include = [
+ "build.rs",
+ "src/**/*.rs",
+ "crates-io.md",
+ "README.md",
+ "LICENSE-APACHE",
+ "LICENSE-MIT",
+]
description = "Token De/Serializer for testing De/Serialize implementations"
homepage = "https://serde.rs"
documentation = "https://docs.serde.rs/serde_test/"
readme = "crates-io.md"
-keywords = ["serde", "serialization"]
+keywords = [
+ "serde",
+ "serialization",
+ "testing",
+ "dev-dependencies",
+]
+categories = ["development-tools::testing"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/serde-rs/serde"
+
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
+
[dependencies.serde]
version = "1.0.60"
+
[dev-dependencies.serde]
version = "1.0"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 848e7d4..4dc37e3 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,17 +1,18 @@
[package]
name = "serde_test"
-version = "1.0.136" # remember to update html_root_url
+version = "1.0.151" # remember to update html_root_url
authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"]
-rust-version = "1.15"
-license = "MIT OR Apache-2.0"
+build = "build.rs"
+categories = ["development-tools::testing"]
description = "Token De/Serializer for testing De/Serialize implementations"
-homepage = "https://serde.rs"
-repository = "https://github.com/serde-rs/serde"
documentation = "https://docs.serde.rs/serde_test/"
-keywords = ["serde", "serialization"]
-readme = "crates-io.md"
+homepage = "https://serde.rs"
include = ["build.rs", "src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APACHE", "LICENSE-MIT"]
-build = "build.rs"
+keywords = ["serde", "serialization", "testing", "dev-dependencies"]
+license = "MIT OR Apache-2.0"
+readme = "crates-io.md"
+repository = "https://github.com/serde-rs/serde"
+rust-version = "1.13"
[dependencies]
serde = { version = "1.0.60", path = "../serde" }
diff --git a/METADATA b/METADATA
index c4e46b0..ae0b331 100644
--- a/METADATA
+++ b/METADATA
@@ -1,3 +1,7 @@
+# This project was upgraded with external_updater.
+# Usage: tools/external_updater/updater.sh update rust/crates/serde_test
+# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
+
name: "serde_test"
description: "Token De/Serializer for testing De/Serialize implementations"
third_party {
@@ -7,13 +11,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/serde_test/serde_test-1.0.136.crate"
+ value: "https://static.crates.io/crates/serde_test/serde_test-1.0.151.crate"
}
- version: "1.0.136"
+ version: "1.0.151"
license_type: NOTICE
last_upgrade_date {
year: 2022
- month: 3
- day: 1
+ month: 12
+ day: 19
}
}
diff --git a/README.md b/README.md
index 79409a3..07453ac 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# Serde &emsp; [![Build Status]][actions] [![Latest Version]][crates.io] [![serde: rustc 1.13+]][Rust 1.13] [![serde_derive: rustc 1.31+]][Rust 1.31]
-[Build Status]: https://img.shields.io/github/workflow/status/serde-rs/serde/CI/master
+[Build Status]: https://img.shields.io/github/actions/workflow/status/serde-rs/serde/ci.yml?branch=master
[actions]: https://github.com/serde-rs/serde/actions?query=branch%3Amaster
[Latest Version]: https://img.shields.io/crates/v/serde.svg
[crates.io]: https://crates.io/crates/serde
diff --git a/build.rs b/build.rs
index 1587065..b7f69d9 100644
--- a/build.rs
+++ b/build.rs
@@ -6,6 +6,8 @@ use std::str::{self, FromStr};
// opening a GitHub issue if your build environment requires some way to enable
// these cfgs other than by executing our build script.
fn main() {
+ println!("cargo:rerun-if-changed=build.rs");
+
let minor = match rustc_minor_version() {
Some(minor) => minor,
None => return,
@@ -13,8 +15,8 @@ fn main() {
// #[track_caller] stabilized in Rust 1.46:
// https://blog.rust-lang.org/2020/08/27/Rust-1.46.0.html#track_caller
- if minor >= 46 {
- println!("cargo:rustc-cfg=track_caller");
+ if minor < 46 {
+ println!("cargo:rustc-cfg=no_track_caller");
}
}
diff --git a/src/assert.rs b/src/assert.rs
index b34b1f5..9be153d 100644
--- a/src/assert.rs
+++ b/src/assert.rs
@@ -28,7 +28,7 @@ use std::fmt::Debug;
/// Token::StructEnd,
/// ]);
/// ```
-#[cfg_attr(track_caller, track_caller)]
+#[cfg_attr(not(no_track_caller), track_caller)]
pub fn assert_tokens<'de, T>(value: &T, tokens: &'de [Token])
where
T: Serialize + Deserialize<'de> + PartialEq + Debug,
@@ -59,7 +59,7 @@ where
/// Token::StructEnd,
/// ]);
/// ```
-#[cfg_attr(track_caller, track_caller)]
+#[cfg_attr(not(no_track_caller), track_caller)]
pub fn assert_ser_tokens<T: ?Sized>(value: &T, tokens: &[Token])
where
T: Serialize,
@@ -112,7 +112,7 @@ where
/// assert_ser_tokens_error(&example, expected, error);
/// }
/// ```
-#[cfg_attr(track_caller, track_caller)]
+#[cfg_attr(not(no_track_caller), track_caller)]
pub fn assert_ser_tokens_error<T: ?Sized>(value: &T, tokens: &[Token], error: &str)
where
T: Serialize,
@@ -150,7 +150,7 @@ where
/// Token::StructEnd,
/// ]);
/// ```
-#[cfg_attr(track_caller, track_caller)]
+#[cfg_attr(not(no_track_caller), track_caller)]
pub fn assert_de_tokens<'de, T>(value: &T, tokens: &'de [Token])
where
T: Deserialize<'de> + PartialEq + Debug,
@@ -203,7 +203,7 @@ where
/// "unknown field `x`, expected `a` or `b`",
/// );
/// ```
-#[cfg_attr(track_caller, track_caller)]
+#[cfg_attr(not(no_track_caller), track_caller)]
pub fn assert_de_tokens_error<'de, T>(tokens: &'de [Token], error: &str)
where
T: Deserialize<'de>,
diff --git a/src/lib.rs b/src/lib.rs
index 3671ee6..106b354 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -144,7 +144,7 @@
//! # }
//! ```
-#![doc(html_root_url = "https://docs.rs/serde_test/1.0.136")]
+#![doc(html_root_url = "https://docs.rs/serde_test/1.0.151")]
#![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))]
// Ignored clippy lints
#![cfg_attr(feature = "cargo-clippy", allow(float_cmp, needless_doctest_main))]
@@ -153,6 +153,7 @@
feature = "cargo-clippy",
allow(
cloned_instead_of_copied,
+ doc_link_with_quotes, // https://github.com/rust-lang/rust-clippy/issues/8961
empty_line_after_outer_attr,
manual_assert,
missing_docs_in_private_items,
@@ -161,6 +162,7 @@
must_use_candidate,
redundant_field_names,
too_many_lines,
+ type_repetition_in_bounds, // https://github.com/rust-lang/rust-clippy/issues/8772
use_debug,
use_self
)