summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid LeGare <legare@google.com>2022-06-23 15:45:56 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-06-23 15:45:56 +0000
commit8b87256b5eb4bf481d6646975c0ffabae1db17fd (patch)
tree11b0c0f28b2ce2f7723271b5963951f8768a4161
parentda9b446fc73202f8b374f1b7ccdd07691c3833bf (diff)
parent00d580909c70d249875edfb98c9c6b591cd35fb7 (diff)
downloadasync-stream-impl-8b87256b5eb4bf481d6646975c0ffabae1db17fd.tar.gz
Upgrade rust/crates/async-stream-impl to 0.3.3 am: 00d580909c
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/async-stream-impl/+/2134036 Change-Id: Iffdaad984e307ff355a8668007bd9228d54d648d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--Android.bp2
-rw-r--r--Cargo.toml21
-rw-r--r--Cargo.toml.orig7
-rw-r--r--METADATA6
-rw-r--r--src/lib.rs10
6 files changed, 29 insertions, 24 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 620b2af..31822d9 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
{
"git": {
- "sha1": "b28da881695e3c66e1782f0c2c330d4e162eb7c2"
- }
-}
+ "sha1": "e1373e4dede24f7700452e499a46561fb45ea515"
+ },
+ "path_in_vcs": "async-stream-impl"
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 7e1ac13..abc0e32 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.2",
+ cargo_pkg_version: "0.3.3",
srcs: ["src/lib.rs"],
edition: "2018",
rustlibs: [
diff --git a/Cargo.toml b/Cargo.toml
index 44a0cb9..e752eb6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,26 +3,25 @@
# 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"
+rust-version = "1.45"
name = "async-stream-impl"
-version = "0.3.2"
+version = "0.3.3"
authors = ["Carl Lerche <me@carllerche.com>"]
description = "proc macros for async-stream crate"
-homepage = "https://github.com/tokio-rs/async-stream"
-documentation = "https://docs.rs/async-stream-impl"
license = "MIT"
repository = "https://github.com/tokio-rs/async-stream"
[lib]
proc-macro = true
+
[dependencies.proc-macro2]
version = "1"
@@ -31,7 +30,11 @@ version = "1"
[dependencies.syn]
version = "1"
-features = ["extra-traits", "full", "visit-mut"]
+features = [
+ "full",
+ "visit-mut",
+]
+
[dev-dependencies.futures-core]
version = "0.3"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 4317fdf..218186c 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,12 +1,11 @@
[package]
name = "async-stream-impl"
-version = "0.3.2"
+version = "0.3.3"
edition = "2018"
+rust-version = "1.45"
license = "MIT"
authors = ["Carl Lerche <me@carllerche.com>"]
description = "proc macros for async-stream crate"
-documentation = "https://docs.rs/async-stream-impl"
-homepage = "https://github.com/tokio-rs/async-stream"
repository = "https://github.com/tokio-rs/async-stream"
[lib]
@@ -14,7 +13,7 @@ proc-macro = true
[dependencies]
proc-macro2 = "1"
-syn = { version = "1", features = ["extra-traits", "full", "visit-mut"]}
+syn = { version = "1", features = ["full", "visit-mut"] }
quote = "1"
[dev-dependencies]
diff --git a/METADATA b/METADATA
index f08d3d2..7953356 100644
--- a/METADATA
+++ b/METADATA
@@ -7,12 +7,12 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/async-stream-impl/async-stream-impl-0.3.2.crate"
+ value: "https://static.crates.io/crates/async-stream-impl/async-stream-impl-0.3.3.crate"
}
- version: "0.3.2"
+ version: "0.3.3"
license_type: NOTICE
last_upgrade_date {
- year: 2021
+ year: 2022
month: 6
day: 21
}
diff --git a/src/lib.rs b/src/lib.rs
index 81d3752..50a988b 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -115,6 +115,8 @@ impl VisitMut for Scrub<'_> {
syn::Expr::Yield(yield_expr) => {
self.has_yielded = true;
+ syn::visit_mut::visit_expr_yield_mut(self, yield_expr);
+
let value_expr = yield_expr.expr.as_ref().unwrap_or(&self.unit);
// let ident = &self.yielder;
@@ -213,8 +215,8 @@ pub fn stream_inner(input: TokenStream) -> TokenStream {
let mut scrub = Scrub::new(false, &crate_path);
- for mut stmt in &mut stmts {
- scrub.visit_stmt_mut(&mut stmt);
+ for stmt in &mut stmts {
+ scrub.visit_stmt_mut(stmt);
}
let dummy_yield = if scrub.has_yielded {
@@ -247,8 +249,8 @@ pub fn try_stream_inner(input: TokenStream) -> TokenStream {
let mut scrub = Scrub::new(true, &crate_path);
- for mut stmt in &mut stmts {
- scrub.visit_stmt_mut(&mut stmt);
+ for stmt in &mut stmts {
+ scrub.visit_stmt_mut(stmt);
}
let dummy_yield = if scrub.has_yielded {