From 00d580909c70d249875edfb98c9c6b591cd35fb7 Mon Sep 17 00:00:00 2001 From: David LeGare Date: Tue, 21 Jun 2022 17:10:47 +0000 Subject: Upgrade rust/crates/async-stream-impl to 0.3.3 Test: make Change-Id: I3a588d7b4acb715a061060de392cddf77096d3b0 --- .cargo_vcs_info.json | 7 ++++--- Android.bp | 2 +- Cargo.toml | 21 ++++++++++++--------- Cargo.toml.orig | 7 +++---- METADATA | 6 +++--- src/lib.rs | 10 ++++++---- 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 "] 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 "] 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 { -- cgit v1.2.3