aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Galenson <jgalenson@google.com>2021-10-05 01:42:35 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-10-05 01:42:35 +0000
commitfd4a59817a9afa1e3f66c51e37b819fc2b85468a (patch)
tree7232be51c9c5eeb220a396170f6ec1dfb5dbd3f8
parentc1f20bd4324088f2e2d934df982abe3f2c6918eb (diff)
parentd99c1e86906f74447d267738c4ea264f761f9c7e (diff)
downloadarbitrary-fd4a59817a9afa1e3f66c51e37b819fc2b85468a.tar.gz
Upgrade rust/crates/arbitrary to 1.0.2 am: 991d748061 am: dfab1ecd8b am: 0254512686 am: d99c1e8690
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/arbitrary/+/1832771 Change-Id: Iebb03be4fa941001101cbfc96ddd29994fd2e900
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp9
-rw-r--r--CHANGELOG.md10
-rw-r--r--Cargo.toml11
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA8
-rw-r--r--src/lib.rs9
7 files changed, 29 insertions, 22 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 262c88c..2d96982 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "5ec3b33f05e8e993688ab872ca5e1a24f4802ebe"
+ "sha1": "ef27875e0311786ca5210a734c6288cb5d920614"
}
}
diff --git a/Android.bp b/Android.bp
index e3be286..16816a1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,6 +41,8 @@ rust_library_rlib {
name: "libarbitrary",
host_supported: true,
crate_name: "arbitrary",
+ cargo_env_compat: true,
+ cargo_pkg_version: "1.0.2",
srcs: ["src/lib.rs"],
edition: "2018",
features: [
@@ -49,10 +51,3 @@ rust_library_rlib {
],
proc_macros: ["libderive_arbitrary"],
}
-
-// dependent_library ["feature_list"]
-// derive_arbitrary-1.0.1
-// proc-macro2-1.0.27 "default,proc-macro"
-// quote-1.0.9 "default,proc-macro"
-// syn-1.0.73 "clone-impls,default,derive,parsing,printing,proc-macro,quote"
-// unicode-xid-0.2.2 "default"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 54dc917..0484728 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -26,6 +26,16 @@ Released YYYY-MM-DD.
* TODO (or remove section if none)
+## 1.0.2
+
+Released 2021-08-25.
+
+### Added
+
+* `Arbitrary` impls for `HashMap`s and `HashSet`s with custom `Hasher`s [#87](https://github.com/rust-fuzz/arbitrary/pull/87)
+
+--------------------------------------------------------------------------------
+
## 1.0.1
Released 2021-05-20.
diff --git a/Cargo.toml b/Cargo.toml
index 1e8eb7a..cc48402 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,17 +3,16 @@
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
-# to registry (e.g., crates.io) dependencies
+# to registry (e.g., crates.io) dependencies.
#
-# If you believe there's an error in this file please file an
-# issue against the rust-lang/cargo repository. If you're
-# editing this file be aware that the upstream Cargo.toml
-# will likely look very different (and much more reasonable)
+# If you are reading this file be aware that the original Cargo.toml
+# will likely look very different (and much more reasonable).
+# See Cargo.toml.orig for the original contents.
[package]
edition = "2018"
name = "arbitrary"
-version = "1.0.1"
+version = "1.0.2"
authors = ["The Rust-Fuzz Project Developers", "Nick Fitzgerald <fitzgen@gmail.com>", "Manish Goregaokar <manishsmail@gmail.com>", "Simonas Kazlauskas <arbitrary@kazlauskas.me>", "Brian L. Troutwine <brian@troutwine.us>", "Corey Farwell <coreyf@rwell.org>"]
description = "The trait for generating structured data from unstructured data"
documentation = "https://docs.rs/arbitrary/"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index e7f7951..63787aa 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "arbitrary"
-version = "1.0.1" # Make sure this matches the derive crate version
+version = "1.0.2" # Make sure this matches the derive crate version
authors = [
"The Rust-Fuzz Project Developers",
"Nick Fitzgerald <fitzgen@gmail.com>",
diff --git a/METADATA b/METADATA
index 132c33c..05cf1ce 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/arbitrary/arbitrary-1.0.1.crate"
+ value: "https://static.crates.io/crates/arbitrary/arbitrary-1.0.2.crate"
}
- version: "1.0.1"
+ version: "1.0.2"
license_type: NOTICE
last_upgrade_date {
year: 2021
- month: 6
- day: 21
+ month: 9
+ day: 22
}
}
diff --git a/src/lib.rs b/src/lib.rs
index fef2620..addcf4e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -45,6 +45,7 @@ use core::time::Duration;
use std::borrow::{Cow, ToOwned};
use std::collections::{BTreeMap, BTreeSet, BinaryHeap, HashMap, HashSet, LinkedList, VecDeque};
use std::ffi::{CString, OsString};
+use std::hash::BuildHasher;
use std::net::{Ipv4Addr, Ipv6Addr};
use std::path::PathBuf;
use std::rc::Rc;
@@ -736,8 +737,8 @@ impl<'a, A: Arbitrary<'a> + Ord> Arbitrary<'a> for BinaryHeap<A> {
}
}
-impl<'a, K: Arbitrary<'a> + Eq + ::std::hash::Hash, V: Arbitrary<'a>> Arbitrary<'a>
- for HashMap<K, V>
+impl<'a, K: Arbitrary<'a> + Eq + ::std::hash::Hash, V: Arbitrary<'a>, S: BuildHasher + Default>
+ Arbitrary<'a> for HashMap<K, V, S>
{
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
u.arbitrary_iter()?.collect()
@@ -753,7 +754,9 @@ impl<'a, K: Arbitrary<'a> + Eq + ::std::hash::Hash, V: Arbitrary<'a>> Arbitrary<
}
}
-impl<'a, A: Arbitrary<'a> + Eq + ::std::hash::Hash> Arbitrary<'a> for HashSet<A> {
+impl<'a, A: Arbitrary<'a> + Eq + ::std::hash::Hash, S: BuildHasher + Default> Arbitrary<'a>
+ for HashSet<A, S>
+{
fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
u.arbitrary_iter()?.collect()
}