aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp9
-rw-r--r--Cargo.toml34
-rw-r--r--Cargo.toml.orig20
-rw-r--r--METADATA14
-rw-r--r--README.md4
-rw-r--r--TEST_MAPPING6
-rw-r--r--build.rs6
-rw-r--r--crates-io.md2
-rw-r--r--src/assert.rs10
-rw-r--r--src/lib.rs14
11 files changed, 81 insertions, 40 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 6b622a5..eb171d7 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "02bd79a0bada78dd88d050f6478806f001f41fb0"
+ "sha1": "ccf9c6fc072378ea8c4f15df1024e258d35d6e61"
},
"path_in_vcs": "serde_test"
} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 107a7b9..5bc4ce1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,11 +43,16 @@ rust_library {
host_supported: true,
crate_name: "serde_test",
cargo_env_compat: true,
- cargo_pkg_version: "1.0.136",
+ cargo_pkg_version: "1.0.152",
srcs: ["src/lib.rs"],
edition: "2015",
- cfgs: ["track_caller"],
rustlibs: [
"libserde",
],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
+ product_available: true,
+ vendor_available: true,
}
diff --git a/Cargo.toml b/Cargo.toml
index 3e4ea31..d04167b 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -10,23 +10,45 @@
# 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.152"
+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/"
+documentation = "https://docs.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"]
+
+[lib]
+doc-scrape-examples = false
+
[dependencies.serde]
version = "1.0.60"
+
[dev-dependencies.serde]
version = "1.0"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 848e7d4..6512723 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.152" # 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"
+documentation = "https://docs.rs/serde_test"
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"
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" }
@@ -20,5 +21,8 @@ serde = { version = "1.0.60", path = "../serde" }
serde = { version = "1.0", path = "../serde" }
serde_derive = { version = "1.0", path = "../serde_derive" }
+[lib]
+doc-scrape-examples = false
+
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
diff --git a/METADATA b/METADATA
index c4e46b0..8758838 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.152.crate"
}
- version: "1.0.136"
+ version: "1.0.152"
license_type: NOTICE
last_upgrade_date {
- year: 2022
- month: 3
- day: 1
+ year: 2023
+ month: 2
+ day: 6
}
}
diff --git a/README.md b/README.md
index 79409a3..c3f6575 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
@@ -19,7 +19,7 @@ You may be looking for:
- [Data formats supported by Serde](https://serde.rs/#data-formats)
- [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/derive.html)
- [Examples](https://serde.rs/examples.html)
-- [API documentation](https://docs.serde.rs/serde/)
+- [API documentation](https://docs.rs/serde)
- [Release notes](https://github.com/serde-rs/serde/releases)
## Serde in action
diff --git a/TEST_MAPPING b/TEST_MAPPING
index a2a8716..0503734 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -5,6 +5,12 @@
"path": "external/rust/crates/bytes"
},
{
+ "path": "external/rust/crates/hashbrown"
+ },
+ {
+ "path": "external/rust/crates/hashlink"
+ },
+ {
"path": "external/rust/crates/slab"
},
{
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/crates-io.md b/crates-io.md
index b57bc5f..6e0ec28 100644
--- a/crates-io.md
+++ b/crates-io.md
@@ -10,7 +10,7 @@ You may be looking for:
- [Data formats supported by Serde](https://serde.rs/#data-formats)
- [Setting up `#[derive(Serialize, Deserialize)]`](https://serde.rs/derive.html)
- [Examples](https://serde.rs/examples.html)
-- [API documentation](https://docs.serde.rs/serde/)
+- [API documentation](https://docs.rs/serde)
- [Release notes](https://github.com/serde-rs/serde/releases)
## Serde in action
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..1e39c1a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,8 +1,8 @@
//! This crate provides a convenient concise way to write unit tests for
//! implementations of [`Serialize`] and [`Deserialize`].
//!
-//! [`Serialize`]: https://docs.serde.rs/serde/ser/trait.Serialize.html
-//! [`Deserialize`]: https://docs.serde.rs/serde/de/trait.Deserialize.html
+//! [`Serialize`]: serde::ser::Serialize
+//! [`Deserialize`]: serde::de::Deserialize
//!
//! The `Serialize` impl for a value can be characterized by the sequence of
//! [`Serializer`] calls that are made in the course of serializing the value,
@@ -14,11 +14,7 @@
//! test both directions. There are also functions to test expected failure
//! conditions.
//!
-//! [`Serializer`]: https://docs.serde.rs/serde/ser/trait.Serializer.html
-//! [`Token`]: https://docs.serde.rs/serde_test/enum.Token.html
-//! [`assert_ser_tokens`]: https://docs.serde.rs/serde_test/fn.assert_ser_tokens.html
-//! [`assert_de_tokens`]: https://docs.serde.rs/serde_test/fn.assert_de_tokens.html
-//! [`assert_tokens`]: https://docs.serde.rs/serde_test/fn.assert_tokens.html
+//! [`Serializer`]: serde::ser::Serializer
//!
//! Here is an example from the [`linked-hash-map`] crate.
//!
@@ -144,7 +140,7 @@
//! # }
//! ```
-#![doc(html_root_url = "https://docs.rs/serde_test/1.0.136")]
+#![doc(html_root_url = "https://docs.rs/serde_test/1.0.152")]
#![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 +149,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 +158,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
)