diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:16:57 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-04-28 16:16:57 +0000 |
commit | 58da12286885e8323ee54e4ad096a3f2ea899a5b (patch) | |
tree | 65023684802c3a34fa0d7b79ad306bc8a80a9ce2 | |
parent | d7aacd32b5f932c99831d44fba7202e1944a362d (diff) | |
parent | 03e6442bba1afa68ec1e97236e31dd209949dbc6 (diff) | |
download | serde_test-android13-frc-neuralnetworks-release.tar.gz |
Snap for 8512216 from 03e6442bba1afa68ec1e97236e31dd209949dbc6 to tm-frc-neuralnetworks-releaset_frc_neu_330443030t_frc_neu_330443000android13-frc-neuralnetworks-release
Change-Id: I6dfa82895853b5458cb13337021ccc0a6a456ca3
-rw-r--r-- | .cargo_vcs_info.json | 7 | ||||
-rw-r--r-- | Android.bp | 3 | ||||
-rw-r--r-- | Cargo.toml | 6 | ||||
-rw-r--r-- | Cargo.toml.orig | 6 | ||||
-rw-r--r-- | METADATA | 10 | ||||
-rw-r--r-- | README.md | 23 | ||||
-rw-r--r-- | build.rs | 48 | ||||
-rw-r--r-- | crates-io.md | 23 | ||||
-rw-r--r-- | src/assert.rs | 4 | ||||
-rw-r--r-- | src/lib.rs | 4 |
10 files changed, 97 insertions, 37 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index d722bd8..6b622a5 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,5 +1,6 @@ { "git": { - "sha1": "65e1a50749938612cfbdb69b57fc4cf249f87149" - } -} + "sha1": "02bd79a0bada78dd88d050f6478806f001f41fb0" + }, + "path_in_vcs": "serde_test" +}
\ No newline at end of file @@ -43,9 +43,10 @@ rust_library { host_supported: true, crate_name: "serde_test", cargo_env_compat: true, - cargo_pkg_version: "1.0.130", + cargo_pkg_version: "1.0.136", srcs: ["src/lib.rs"], edition: "2015", + cfgs: ["track_caller"], rustlibs: [ "libserde", ], @@ -10,10 +10,12 @@ # See Cargo.toml.orig for the original contents. [package] +rust-version = "1.15" name = "serde_test" -version = "1.0.130" +version = "1.0.136" authors = ["Erick Tryzelaar <erick.tryzelaar@gmail.com>", "David Tolnay <dtolnay@gmail.com>"] -include = ["src/**/*.rs", "crates-io.md", "README.md", "LICENSE-APACHE", "LICENSE-MIT"] +build = "build.rs" +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/" diff --git a/Cargo.toml.orig b/Cargo.toml.orig index 02d0a56..848e7d4 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,7 +1,8 @@ [package] name = "serde_test" -version = "1.0.130" # remember to update html_root_url +version = "1.0.136" # 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" description = "Token De/Serializer for testing De/Serialize implementations" homepage = "https://serde.rs" @@ -9,7 +10,8 @@ repository = "https://github.com/serde-rs/serde" documentation = "https://docs.serde.rs/serde_test/" keywords = ["serde", "serialization"] readme = "crates-io.md" -include = ["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"] +build = "build.rs" [dependencies] serde = { version = "1.0.60", path = "../serde" } @@ -7,13 +7,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/serde_test/serde_test-1.0.130.crate" + value: "https://static.crates.io/crates/serde_test/serde_test-1.0.136.crate" } - version: "1.0.130" + version: "1.0.136" license_type: NOTICE last_upgrade_date { - year: 2021 - month: 9 - day: 22 + year: 2022 + month: 3 + day: 1 } } @@ -77,17 +77,20 @@ fn main() { Serde is one of the most widely used Rust libraries so any place that Rustaceans congregate will be able to help you out. For chat, consider trying the -[#general] or [#beginners] channels of the unofficial community Discord, the -[#rust-usage] channel of the official Rust Project Discord, or the -[#general][zulip] stream in Zulip. For asynchronous, consider the [\[rust\] tag -on StackOverflow][stackoverflow], the [/r/rust] subreddit which has a pinned -weekly easy questions post, or the Rust [Discourse forum][discourse]. It's -acceptable to file a support issue in this repo but they tend not to get as many -eyes as any of the above and may get closed without a response after some time. - -[#general]: https://discord.com/channels/273534239310479360/274215136414400513 -[#beginners]: https://discord.com/channels/273534239310479360/273541522815713281 +[#rust-questions] or [#rust-beginners] channels of the unofficial community +Discord (invite: <https://discord.gg/rust-lang-community>), the [#rust-usage] or +[#beginners] channels of the official Rust Project Discord (invite: +<https://discord.gg/rust-lang>), or the [#general][zulip] stream in Zulip. For +asynchronous, consider the [\[rust\] tag on StackOverflow][stackoverflow], the +[/r/rust] subreddit which has a pinned weekly easy questions post, or the Rust +[Discourse forum][discourse]. It's acceptable to file a support issue in this +repo but they tend not to get as many eyes as any of the above and may get +closed without a response after some time. + +[#rust-questions]: https://discord.com/channels/273534239310479360/274215136414400513 +[#rust-beginners]: https://discord.com/channels/273534239310479360/273541522815713281 [#rust-usage]: https://discord.com/channels/442252698964721669/443150878111694848 +[#beginners]: https://discord.com/channels/442252698964721669/448238009733742612 [zulip]: https://rust-lang.zulipchat.com/#narrow/stream/122651-general [stackoverflow]: https://stackoverflow.com/questions/tagged/rust [/r/rust]: https://www.reddit.com/r/rust diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..1587065 --- /dev/null +++ b/build.rs @@ -0,0 +1,48 @@ +use std::env; +use std::process::Command; +use std::str::{self, FromStr}; + +// The rustc-cfg strings below are *not* public API. Please let us know by +// opening a GitHub issue if your build environment requires some way to enable +// these cfgs other than by executing our build script. +fn main() { + let minor = match rustc_minor_version() { + Some(minor) => minor, + None => return, + }; + + // #[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"); + } +} + +fn rustc_minor_version() -> Option<u32> { + let rustc = match env::var_os("RUSTC") { + Some(rustc) => rustc, + None => return None, + }; + + let output = match Command::new(rustc).arg("--version").output() { + Ok(output) => output, + Err(_) => return None, + }; + + let version = match str::from_utf8(&output.stdout) { + Ok(version) => version, + Err(_) => return None, + }; + + let mut pieces = version.split('.'); + if pieces.next() != Some("rustc 1") { + return None; + } + + let next = match pieces.next() { + Some(next) => next, + None => return None, + }; + + u32::from_str(next).ok() +} diff --git a/crates-io.md b/crates-io.md index 0775761..b57bc5f 100644 --- a/crates-io.md +++ b/crates-io.md @@ -45,17 +45,20 @@ fn main() { Serde is one of the most widely used Rust libraries so any place that Rustaceans congregate will be able to help you out. For chat, consider trying the -[#general] or [#beginners] channels of the unofficial community Discord, the -[#rust-usage] channel of the official Rust Project Discord, or the -[#general][zulip] stream in Zulip. For asynchronous, consider the [\[rust\] tag -on StackOverflow][stackoverflow], the [/r/rust] subreddit which has a pinned -weekly easy questions post, or the Rust [Discourse forum][discourse]. It's -acceptable to file a support issue in this repo but they tend not to get as many -eyes as any of the above and may get closed without a response after some time. - -[#general]: https://discord.com/channels/273534239310479360/274215136414400513 -[#beginners]: https://discord.com/channels/273534239310479360/273541522815713281 +[#rust-questions] or [#rust-beginners] channels of the unofficial community +Discord (invite: <https://discord.gg/rust-lang-community>, the [#rust-usage] or +[#beginners] channels of the official Rust Project Discord (invite: +<https://discord.gg/rust-lang>), or the [#general][zulip] stream in Zulip. For +asynchronous, consider the [\[rust\] tag on StackOverflow][stackoverflow], the +[/r/rust] subreddit which has a pinned weekly easy questions post, or the Rust +[Discourse forum][discourse]. It's acceptable to file a support issue in this +repo but they tend not to get as many eyes as any of the above and may get +closed without a response after some time. + +[#rust-questions]: https://discord.com/channels/273534239310479360/274215136414400513 +[#rust-beginners]: https://discord.com/channels/273534239310479360/273541522815713281 [#rust-usage]: https://discord.com/channels/442252698964721669/443150878111694848 +[#beginners]: https://discord.com/channels/442252698964721669/448238009733742612 [zulip]: https://rust-lang.zulipchat.com/#narrow/stream/122651-general [stackoverflow]: https://stackoverflow.com/questions/tagged/rust [/r/rust]: https://www.reddit.com/r/rust diff --git a/src/assert.rs b/src/assert.rs index 423eb2a..b34b1f5 100644 --- a/src/assert.rs +++ b/src/assert.rs @@ -60,7 +60,7 @@ where /// ]); /// ``` #[cfg_attr(track_caller, track_caller)] -pub fn assert_ser_tokens<T>(value: &T, tokens: &[Token]) +pub fn assert_ser_tokens<T: ?Sized>(value: &T, tokens: &[Token]) where T: Serialize, { @@ -113,7 +113,7 @@ where /// } /// ``` #[cfg_attr(track_caller, track_caller)] -pub fn assert_ser_tokens_error<T>(value: &T, tokens: &[Token], error: &str) +pub fn assert_ser_tokens_error<T: ?Sized>(value: &T, tokens: &[Token], error: &str) where T: Serialize, { @@ -144,9 +144,8 @@ //! # } //! ``` -#![doc(html_root_url = "https://docs.rs/serde_test/1.0.130")] +#![doc(html_root_url = "https://docs.rs/serde_test/1.0.136")] #![cfg_attr(feature = "cargo-clippy", allow(renamed_and_removed_lints))] -#![cfg_attr(feature = "cargo-clippy", deny(clippy, clippy_pedantic))] // Ignored clippy lints #![cfg_attr(feature = "cargo-clippy", allow(float_cmp, needless_doctest_main))] // Ignored clippy_pedantic lints @@ -155,6 +154,7 @@ allow( cloned_instead_of_copied, empty_line_after_outer_attr, + manual_assert, missing_docs_in_private_items, missing_panics_doc, module_name_repetitions, |