diff options
author | David LeGare <legare@google.com> | 2022-06-21 17:10:47 +0000 |
---|---|---|
committer | David LeGare <legare@google.com> | 2022-06-21 17:10:47 +0000 |
commit | 00d580909c70d249875edfb98c9c6b591cd35fb7 (patch) | |
tree | 11b0c0f28b2ce2f7723271b5963951f8768a4161 | |
parent | da9b446fc73202f8b374f1b7ccdd07691c3833bf (diff) | |
download | async-stream-impl-00d580909c70d249875edfb98c9c6b591cd35fb7.tar.gz |
Upgrade rust/crates/async-stream-impl to 0.3.3
Test: make
Change-Id: I3a588d7b4acb715a061060de392cddf77096d3b0
-rw-r--r-- | .cargo_vcs_info.json | 7 | ||||
-rw-r--r-- | Android.bp | 2 | ||||
-rw-r--r-- | Cargo.toml | 21 | ||||
-rw-r--r-- | Cargo.toml.orig | 7 | ||||
-rw-r--r-- | METADATA | 6 | ||||
-rw-r--r-- | 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 @@ -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: [ @@ -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] @@ -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 } @@ -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 { |