Snap for 10453563 from 8d5268645dc18eaa32271113df3b921073778da2 to mainline-extservices-release
Change-Id: I68dd15b6afed5bab93d6e594a7dc9693273005ff
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 942329b..f6443fd 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "fc1e3250219170e31cddb8857a276cba7dd08d44"
+ "sha1": "5e3693a350f96244151081d2c030208cd15f9572"
},
"path_in_vcs": "futures-macro"
}
\ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 7674084..7c13ccd 100644
--- a/Android.bp
+++ b/Android.bp
@@ -41,7 +41,7 @@
name: "libfutures_macro",
crate_name: "futures_macro",
cargo_env_compat: true,
- cargo_pkg_version: "0.3.21",
+ cargo_pkg_version: "0.3.26",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
@@ -49,4 +49,6 @@
"libquote",
"libsyn",
],
+ product_available: true,
+ vendor_available: true,
}
diff --git a/Cargo.toml b/Cargo.toml
index 86fc5c9..356e092 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.45"
name = "futures-macro"
-version = "0.3.21"
+version = "0.3.26"
description = """
The futures-rs procedural macro implementations.
"""
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index a929d0f..5e2ed17 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "futures-macro"
-version = "0.3.21"
+version = "0.3.26"
edition = "2018"
rust-version = "1.45"
license = "MIT OR Apache-2.0"
diff --git a/METADATA b/METADATA
index ca144da..2bf4b60 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/futures-macro
+# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
+
name: "futures-macro"
description: "The futures-rs procedural macro implementations."
third_party {
@@ -7,13 +11,13 @@
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/futures-macro/futures-macro-0.3.21.crate"
+ value: "https://static.crates.io/crates/futures-macro/futures-macro-0.3.26.crate"
}
- version: "0.3.21"
+ version: "0.3.26"
license_type: NOTICE
last_upgrade_date {
- year: 2022
- month: 3
- day: 1
+ year: 2023
+ month: 2
+ day: 15
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 5ef61de..3a6d2f1 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -5,6 +5,18 @@
"path": "external/rust/crates/anyhow"
},
{
+ "path": "external/rust/crates/async-stream"
+ },
+ {
+ "path": "external/rust/crates/futures-channel"
+ },
+ {
+ "path": "external/rust/crates/futures-executor"
+ },
+ {
+ "path": "external/rust/crates/futures-test"
+ },
+ {
"path": "external/rust/crates/futures-util"
},
{
@@ -12,34 +24,24 @@
},
{
"path": "external/rust/crates/tokio-test"
- }
- ],
- "presubmit": [
- {
- "name": "ZipFuseTest"
},
{
- "name": "authfs_device_test_src_lib"
+ "path": "packages/modules/DnsResolver"
},
{
- "name": "doh_unit_test"
+ "path": "packages/modules/Virtualization/authfs"
},
{
- "name": "virtualizationservice_device_test"
- }
- ],
- "presubmit-rust": [
- {
- "name": "ZipFuseTest"
+ "path": "packages/modules/Virtualization/virtualizationmanager"
},
{
- "name": "authfs_device_test_src_lib"
+ "path": "packages/modules/Virtualization/zipfuse"
},
{
- "name": "doh_unit_test"
+ "path": "system/security/keystore2"
},
{
- "name": "virtualizationservice_device_test"
+ "path": "system/security/keystore2/legacykeystore"
}
]
}
diff --git a/src/join.rs b/src/join.rs
index d427da2..94e356f 100644
--- a/src/join.rs
+++ b/src/join.rs
@@ -38,6 +38,7 @@
// Move future into a local so that it is pinned in one place and
// is no longer accessible by the end user.
let mut #name = __futures_crate::future::maybe_done(#expr);
+ let mut #name = unsafe { __futures_crate::Pin::new_unchecked(&mut #name) };
});
name
})
@@ -58,12 +59,12 @@
let poll_futures = future_names.iter().map(|fut| {
quote! {
__all_done &= __futures_crate::future::Future::poll(
- unsafe { __futures_crate::Pin::new_unchecked(&mut #fut) }, __cx).is_ready();
+ #fut.as_mut(), __cx).is_ready();
}
});
let take_outputs = future_names.iter().map(|fut| {
quote! {
- unsafe { __futures_crate::Pin::new_unchecked(&mut #fut) }.take_output().unwrap(),
+ #fut.as_mut().take_output().unwrap(),
}
});
@@ -96,17 +97,17 @@
let poll_futures = future_names.iter().map(|fut| {
quote! {
if __futures_crate::future::Future::poll(
- unsafe { __futures_crate::Pin::new_unchecked(&mut #fut) }, __cx).is_pending()
+ #fut.as_mut(), __cx).is_pending()
{
__all_done = false;
- } else if unsafe { __futures_crate::Pin::new_unchecked(&mut #fut) }.output_mut().unwrap().is_err() {
+ } else if #fut.as_mut().output_mut().unwrap().is_err() {
// `.err().unwrap()` rather than `.unwrap_err()` so that we don't introduce
// a `T: Debug` bound.
// Also, for an error type of ! any code after `err().unwrap()` is unreachable.
#[allow(unreachable_code)]
return __futures_crate::task::Poll::Ready(
__futures_crate::Err(
- unsafe { __futures_crate::Pin::new_unchecked(&mut #fut) }.take_output().unwrap().err().unwrap()
+ #fut.as_mut().take_output().unwrap().err().unwrap()
)
);
}
@@ -118,7 +119,7 @@
// an `E: Debug` bound.
// Also, for an ok type of ! any code after `ok().unwrap()` is unreachable.
#[allow(unreachable_code)]
- unsafe { __futures_crate::Pin::new_unchecked(&mut #fut) }.take_output().unwrap().ok().unwrap(),
+ #fut.as_mut().take_output().unwrap().ok().unwrap(),
}
});