Snap for 7110675 from b8d684a998738dfbfde020bbabea8dc25ed2737b to sdk-release
Change-Id: I4d2539cdf5224bd69a18cdaca11f2f9ab4caa384
diff --git a/Android.bp b/Android.bp
index 51859fd..1db33d8 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --run --device --dependencies.
+// This file is generated by cargo2android.py --run --dependencies --device --features=thread-pool --patch=patches/Android.bp.patch.
rust_library {
name: "libfutures_executor",
@@ -7,26 +7,34 @@
srcs: ["src/lib.rs"],
edition: "2018",
features: [
- "default",
+ "num_cpus",
"std",
+ "thread-pool",
],
rustlibs: [
"libfutures_core",
"libfutures_task",
"libfutures_util",
+ "libnum_cpus",
+ ],
+ apex_available: [
+ "//apex_available:platform",
+ "com.android.virt",
],
}
// dependent_library ["feature_list"]
-// futures-core-0.3.5 "alloc,std"
-// futures-task-0.3.5 "alloc,once_cell,std"
-// futures-util-0.3.5 "alloc,slab,std"
-// once_cell-1.4.0 "std"
-// pin-project-0.4.22
-// pin-project-internal-0.4.22
+// futures-core-0.3.8 "alloc,std"
+// futures-task-0.3.8 "alloc,once_cell,std"
+// futures-util-0.3.8 "alloc,slab,std"
+// libc-0.2.80 "default,std"
+// num_cpus-1.13.0
+// once_cell-1.5.2 "alloc,std"
+// pin-project-1.0.2
+// pin-project-internal-1.0.2
// pin-utils-0.1.0
-// proc-macro2-1.0.18 "default,proc-macro"
+// proc-macro2-1.0.24 "default,proc-macro"
// quote-1.0.7 "default,proc-macro"
// slab-0.4.2
-// syn-1.0.34 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut"
+// syn-1.0.53 "clone-impls,default,derive,full,parsing,printing,proc-macro,quote,visit-mut"
// unicode-xid-0.2.1 "default"
diff --git a/Cargo.toml b/Cargo.toml
index fcd877c..429a25d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,25 +13,26 @@
[package]
edition = "2018"
name = "futures-executor"
-version = "0.3.5"
+version = "0.3.7"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
description = "Executors for asynchronous tasks based on the futures-rs library.\n"
homepage = "https://rust-lang.github.io/futures-rs"
-documentation = "https://docs.rs/futures-executor/0.3.5"
+documentation = "https://docs.rs/futures-executor/0.3.7"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/futures-rs"
[package.metadata.docs.rs]
all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
[dependencies.futures-core]
-version = "0.3.5"
+version = "0.3.7"
default-features = false
[dependencies.futures-task]
-version = "0.3.5"
+version = "0.3.7"
default-features = false
[dependencies.futures-util]
-version = "0.3.5"
+version = "0.3.7"
default-features = false
[dependencies.num_cpus]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index ad6aa34..579ee9a 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,12 +1,12 @@
[package]
name = "futures-executor"
edition = "2018"
-version = "0.3.5"
+version = "0.3.7"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/futures-rs"
homepage = "https://rust-lang.github.io/futures-rs"
-documentation = "https://docs.rs/futures-executor/0.3.5"
+documentation = "https://docs.rs/futures-executor/0.3.7"
description = """
Executors for asynchronous tasks based on the futures-rs library.
"""
@@ -17,10 +17,11 @@
thread-pool = ["std", "num_cpus"]
[dependencies]
-futures-core = { path = "../futures-core", version = "0.3.5", default-features = false }
-futures-task = { path = "../futures-task", version = "0.3.5", default-features = false }
-futures-util = { path = "../futures-util", version = "0.3.5", default-features = false }
+futures-core = { path = "../futures-core", version = "0.3.7", default-features = false }
+futures-task = { path = "../futures-task", version = "0.3.7", default-features = false }
+futures-util = { path = "../futures-util", version = "0.3.7", default-features = false }
num_cpus = { version = "1.8.0", optional = true }
[package.metadata.docs.rs]
all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
diff --git a/METADATA b/METADATA
index 2ca69f4..9b8b9ae 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/futures-executor/futures-executor-0.3.5.crate"
+ value: "https://static.crates.io/crates/futures-executor/futures-executor-0.3.7.crate"
}
- version: "0.3.5"
+ version: "0.3.7"
license_type: NOTICE
last_upgrade_date {
year: 2020
- month: 5
- day: 8
+ month: 10
+ day: 25
}
}
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch
new file mode 100644
index 0000000..0d3face
--- /dev/null
+++ b/patches/Android.bp.patch
@@ -0,0 +1,15 @@
+diff --git a/Android.bp b/Android.bp
+index 8b0a7f0..0f6408c 100644
+--- a/Android.bp
++++ b/Android.bp
+@@ -15,6 +15,10 @@ rust_library {
+ "libfutures_task",
+ "libfutures_util",
+ ],
++ apex_available: [
++ "//apex_available:platform",
++ "com.android.virt",
++ ],
+ }
+
+ // dependent_library ["feature_list"]
diff --git a/src/lib.rs b/src/lib.rs
index 8be8b0f..a8ba5c8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,9 +10,16 @@
#![cfg_attr(test, warn(single_use_lifetimes))]
#![warn(clippy::all)]
+// mem::take requires Rust 1.40, matches! requires Rust 1.42
+// Can be removed if the minimum supported version increased or if https://github.com/rust-lang/rust-clippy/issues/3941
+// get's implemented.
+#![allow(clippy::mem_replace_with_default, clippy::match_like_matches_macro)]
+
#![doc(test(attr(deny(warnings), allow(dead_code, unused_assignments, unused_variables))))]
-#![doc(html_root_url = "https://docs.rs/futures-executor/0.3.5")]
+#![doc(html_root_url = "https://docs.rs/futures-executor/0.3.7")]
+
+#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(feature = "std")]
mod local_pool;
@@ -23,9 +30,11 @@
#[cfg(feature = "std")]
mod unpark_mutex;
#[cfg(feature = "thread-pool")]
+#[cfg_attr(docsrs, doc(cfg(feature = "thread-pool")))]
#[cfg(feature = "std")]
mod thread_pool;
#[cfg(feature = "thread-pool")]
+#[cfg_attr(docsrs, doc(cfg(feature = "thread-pool")))]
#[cfg(feature = "std")]
pub use crate::thread_pool::{ThreadPool, ThreadPoolBuilder};
diff --git a/src/thread_pool.rs b/src/thread_pool.rs
index 78a225f..3247aa3 100644
--- a/src/thread_pool.rs
+++ b/src/thread_pool.rs
@@ -24,6 +24,7 @@
///
/// This type is only available when the `thread-pool` feature of this
/// library is activated.
+#[cfg_attr(docsrs, doc(cfg(feature = "thread-pool")))]
pub struct ThreadPool {
state: Arc<PoolState>,
}
@@ -32,6 +33,7 @@
///
/// This type is only available when the `thread-pool` feature of this
/// library is activated.
+#[cfg_attr(docsrs, doc(cfg(feature = "thread-pool")))]
pub struct ThreadPoolBuilder {
pool_size: usize,
stack_size: usize,