summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2023-03-03 19:38:22 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-03-03 19:38:22 +0000
commit85d9b06ef509f5390676efcf648608c0e87e8e1d (patch)
treec80eef5c73096ef3372c8f94329fbf5a2f182154
parent4f9b8636278ecaaec1b19b39dc653f4ed9134bb7 (diff)
parent6e66b26c568a4c308cf6828d9bb45c1064aa1513 (diff)
downloadasync-stream-impl-85d9b06ef509f5390676efcf648608c0e87e8e1d.tar.gz
Upgrade async-stream-impl to 0.3.4 am: 542806003b am: d275319ec6 am: 6e66b26c56
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/async-stream-impl/+/2466093 Change-Id: I2f313b800b030682a5ac622116a86408de2c523f Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml2
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA14
-rw-r--r--src/lib.rs14
6 files changed, 21 insertions, 15 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 31822d9..f6454dd 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "e1373e4dede24f7700452e499a46561fb45ea515"
+ "sha1": "bf41b9645fe39b8865da2f25edc286eb42d49ec8"
},
"path_in_vcs": "async-stream-impl"
} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index abc0e32..86e3496 100644
--- a/Android.bp
+++ b/Android.bp
@@ -24,7 +24,7 @@ rust_proc_macro {
name: "libasync_stream_impl",
crate_name: "async_stream_impl",
cargo_env_compat: true,
- cargo_pkg_version: "0.3.3",
+ cargo_pkg_version: "0.3.4",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
diff --git a/Cargo.toml b/Cargo.toml
index e752eb6..4b74dfb 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
edition = "2018"
rust-version = "1.45"
name = "async-stream-impl"
-version = "0.3.3"
+version = "0.3.4"
authors = ["Carl Lerche <me@carllerche.com>"]
description = "proc macros for async-stream crate"
license = "MIT"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 218186c..fc0a8e3 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "async-stream-impl"
-version = "0.3.3"
+version = "0.3.4"
edition = "2018"
rust-version = "1.45"
license = "MIT"
diff --git a/METADATA b/METADATA
index 7953356..7fb5079 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/async-stream-impl
+# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md
+
name: "async-stream-impl"
description: "proc macros for async-stream crate"
third_party {
@@ -7,13 +11,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/async-stream-impl/async-stream-impl-0.3.3.crate"
+ value: "https://static.crates.io/crates/async-stream-impl/async-stream-impl-0.3.4.crate"
}
- version: "0.3.3"
+ version: "0.3.4"
license_type: NOTICE
last_upgrade_date {
- year: 2022
- month: 6
- day: 21
+ year: 2023
+ month: 3
+ day: 2
}
}
diff --git a/src/lib.rs b/src/lib.rs
index 50a988b..7309648 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -174,7 +174,7 @@ impl VisitMut for Scrub<'_> {
};
#label
loop {
- let #pat = match #crate_path::reexport::next(&mut __pinned).await {
+ let #pat = match #crate_path::__private::next(&mut __pinned).await {
::core::option::Option::Some(e) => e,
::core::option::Option::None => break,
};
@@ -228,8 +228,8 @@ pub fn stream_inner(input: TokenStream) -> TokenStream {
};
quote!({
- let (mut __yield_tx, __yield_rx) = #crate_path::yielder::pair();
- #crate_path::AsyncStream::new(__yield_rx, async move {
+ let (mut __yield_tx, __yield_rx) = unsafe { #crate_path::__private::yielder::pair() };
+ #crate_path::__private::AsyncStream::new(__yield_rx, async move {
#dummy_yield
#(#stmts)*
})
@@ -262,8 +262,8 @@ pub fn try_stream_inner(input: TokenStream) -> TokenStream {
};
quote!({
- let (mut __yield_tx, __yield_rx) = #crate_path::yielder::pair();
- #crate_path::AsyncStream::new(__yield_rx, async move {
+ let (mut __yield_tx, __yield_rx) = unsafe { #crate_path::__private::yielder::pair() };
+ #crate_path::__private::AsyncStream::new(__yield_rx, async move {
#dummy_yield
#(#stmts)*
})
@@ -290,7 +290,9 @@ fn replace_for_await(input: impl IntoIterator<Item = TokenTree>) -> TokenStream2
}
TokenTree::Group(group) => {
let stream = replace_for_await(group.stream());
- tokens.push(Group::new(group.delimiter(), stream).into());
+ let mut new_group = Group::new(group.delimiter(), stream);
+ new_group.set_span(group.span());
+ tokens.push(new_group.into());
}
_ => tokens.push(token),
}