diff options
author | Jeffrey Vander Stoep <jeffv@google.com> | 2022-12-12 16:05:43 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-12-12 16:05:43 +0000 |
commit | dad0c909556d398027d24f11f86171492282121c (patch) | |
tree | c5d1e2efa0ad398a5c6bf374fc939a3e8f72f728 | |
parent | 06e5cc91d3354a03e374067c9d949293b3017a34 (diff) | |
parent | b8b1de7a16794b8f6f6abda6afa6004039811aa6 (diff) | |
download | futures-channel-dad0c909556d398027d24f11f86171492282121c.tar.gz |
Merge "Upgrade futures-channel to 0.3.25"main-16k-with-phones
-rw-r--r-- | .cargo_vcs_info.json | 2 | ||||
-rw-r--r-- | Android.bp | 6 | ||||
-rw-r--r-- | Cargo.toml | 7 | ||||
-rw-r--r-- | Cargo.toml.orig | 6 | ||||
-rw-r--r-- | METADATA | 12 | ||||
-rw-r--r-- | no_atomic_cas.rs | 4 | ||||
-rw-r--r-- | tests/mpsc.rs | 31 | ||||
-rw-r--r-- | tests/oneshot.rs | 10 |
8 files changed, 32 insertions, 46 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json index deccf0d..662e5e9 100644 --- a/.cargo_vcs_info.json +++ b/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "fc1e3250219170e31cddb8857a276cba7dd08d44" + "sha1": "77d82198c5afd04af3e760a6aa50b7e875289fc3" }, "path_in_vcs": "futures-channel" }
\ No newline at end of file @@ -46,7 +46,7 @@ rust_test { host_supported: true, crate_name: "futures_channel", cargo_env_compat: true, - cargo_pkg_version: "0.3.21", + cargo_pkg_version: "0.3.25", srcs: ["src/lib.rs"], test_suites: ["general-tests"], auto_gen_config: true, @@ -73,7 +73,7 @@ rust_defaults { name: "futures-channel_test_defaults", crate_name: "futures_channel", cargo_env_compat: true, - cargo_pkg_version: "0.3.21", + cargo_pkg_version: "0.3.25", test_suites: ["general-tests"], auto_gen_config: true, edition: "2018", @@ -138,7 +138,7 @@ rust_library { host_supported: true, crate_name: "futures_channel", cargo_env_compat: true, - cargo_pkg_version: "0.3.21", + cargo_pkg_version: "0.3.25", srcs: ["src/lib.rs"], edition: "2018", features: [ @@ -13,11 +13,12 @@ edition = "2018" rust-version = "1.45" name = "futures-channel" -version = "0.3.21" +version = "0.3.25" description = """ Channels for asynchronous communication using futures-rs. """ homepage = "https://rust-lang.github.io/futures-rs" +readme = "README.md" license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/futures-rs" @@ -29,11 +30,11 @@ rustdoc-args = [ ] [dependencies.futures-core] -version = "0.3.21" +version = "0.3.25" default-features = false [dependencies.futures-sink] -version = "0.3.21" +version = "0.3.25" optional = true default-features = false diff --git a/Cargo.toml.orig b/Cargo.toml.orig index f356eab..eef8684 100644 --- a/Cargo.toml.orig +++ b/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "futures-channel" -version = "0.3.21" +version = "0.3.25" edition = "2018" rust-version = "1.45" license = "MIT OR Apache-2.0" @@ -22,8 +22,8 @@ unstable = [] cfg-target-has-atomic = [] [dependencies] -futures-core = { path = "../futures-core", version = "0.3.21", default-features = false } -futures-sink = { path = "../futures-sink", version = "0.3.21", default-features = false, optional = true } +futures-core = { path = "../futures-core", version = "0.3.25", default-features = false } +futures-sink = { path = "../futures-sink", version = "0.3.25", default-features = false, optional = true } [dev-dependencies] futures = { path = "../futures", default-features = true } @@ -1,3 +1,7 @@ +# This project was upgraded with external_updater. +# Usage: tools/external_updater/updater.sh update rust/crates/futures-channel +# For more info, check https://cs.android.com/android/platform/superproject/+/master:tools/external_updater/README.md + name: "futures-channel" description: "Channels for asynchronous communication using futures-rs." third_party { @@ -7,13 +11,13 @@ third_party { } url { type: ARCHIVE - value: "https://static.crates.io/crates/futures-channel/futures-channel-0.3.21.crate" + value: "https://static.crates.io/crates/futures-channel/futures-channel-0.3.25.crate" } - version: "0.3.21" + version: "0.3.25" license_type: NOTICE last_upgrade_date { year: 2022 - month: 3 - day: 1 + month: 12 + day: 12 } } diff --git a/no_atomic_cas.rs b/no_atomic_cas.rs index 9b05d4b..16ec628 100644 --- a/no_atomic_cas.rs +++ b/no_atomic_cas.rs @@ -2,12 +2,16 @@ // It is not intended for manual editing. const NO_ATOMIC_CAS: &[&str] = &[ + "armv4t-none-eabi", + "armv5te-none-eabi", "avr-unknown-gnu-atmega328", "bpfeb-unknown-none", "bpfel-unknown-none", "msp430-none-elf", "riscv32i-unknown-none-elf", + "riscv32im-unknown-none-elf", "riscv32imc-unknown-none-elf", "thumbv4t-none-eabi", + "thumbv5te-none-eabi", "thumbv6m-none-eabi", ]; diff --git a/tests/mpsc.rs b/tests/mpsc.rs index da0899d..444c8e1 100644 --- a/tests/mpsc.rs +++ b/tests/mpsc.rs @@ -200,10 +200,7 @@ fn tx_close_gets_none() { #[test] fn stress_shared_unbounded() { - #[cfg(miri)] - const AMT: u32 = 100; - #[cfg(not(miri))] - const AMT: u32 = 10000; + const AMT: u32 = if cfg!(miri) { 100 } else { 10000 }; const NTHREADS: u32 = 8; let (tx, rx) = mpsc::unbounded::<i32>(); @@ -232,10 +229,7 @@ fn stress_shared_unbounded() { #[test] fn stress_shared_bounded_hard() { - #[cfg(miri)] - const AMT: u32 = 100; - #[cfg(not(miri))] - const AMT: u32 = 10000; + const AMT: u32 = if cfg!(miri) { 100 } else { 10000 }; const NTHREADS: u32 = 8; let (tx, rx) = mpsc::channel::<i32>(0); @@ -265,10 +259,7 @@ fn stress_shared_bounded_hard() { #[allow(clippy::same_item_push)] #[test] fn stress_receiver_multi_task_bounded_hard() { - #[cfg(miri)] - const AMT: usize = 100; - #[cfg(not(miri))] - const AMT: usize = 10_000; + const AMT: usize = if cfg!(miri) { 100 } else { 10_000 }; const NTHREADS: u32 = 2; let (mut tx, rx) = mpsc::channel::<usize>(0); @@ -336,10 +327,7 @@ fn stress_receiver_multi_task_bounded_hard() { /// after sender dropped. #[test] fn stress_drop_sender() { - #[cfg(miri)] - const ITER: usize = 100; - #[cfg(not(miri))] - const ITER: usize = 10000; + const ITER: usize = if cfg!(miri) { 100 } else { 10000 }; fn list() -> impl Stream<Item = i32> { let (tx, rx) = mpsc::channel(1); @@ -394,10 +382,9 @@ fn stress_close_receiver_iter() { } } -#[cfg_attr(miri, ignore)] // Miri is too slow #[test] fn stress_close_receiver() { - const ITER: usize = 10000; + const ITER: usize = if cfg!(miri) { 50 } else { 10000 }; for _ in 0..ITER { stress_close_receiver_iter(); @@ -414,10 +401,7 @@ async fn stress_poll_ready_sender(mut sender: mpsc::Sender<u32>, count: u32) { #[allow(clippy::same_item_push)] #[test] fn stress_poll_ready() { - #[cfg(miri)] - const AMT: u32 = 100; - #[cfg(not(miri))] - const AMT: u32 = 1000; + const AMT: u32 = if cfg!(miri) { 100 } else { 1000 }; const NTHREADS: u32 = 8; /// Run a stress test using the specified channel capacity. @@ -444,10 +428,9 @@ fn stress_poll_ready() { stress(16); } -#[cfg_attr(miri, ignore)] // Miri is too slow #[test] fn try_send_1() { - const N: usize = 3000; + const N: usize = if cfg!(miri) { 100 } else { 3000 }; let (mut tx, rx) = mpsc::channel(0); let t = thread::spawn(move || { diff --git a/tests/oneshot.rs b/tests/oneshot.rs index c9f5508..6b48376 100644 --- a/tests/oneshot.rs +++ b/tests/oneshot.rs @@ -35,10 +35,7 @@ fn cancel_notifies() { #[test] fn cancel_lots() { - #[cfg(miri)] - const N: usize = 100; - #[cfg(not(miri))] - const N: usize = 20000; + const N: usize = if cfg!(miri) { 100 } else { 20000 }; let (tx, rx) = mpsc::channel::<(Sender<_>, mpsc::Sender<_>)>(); let t = thread::spawn(move || { @@ -106,10 +103,7 @@ fn is_canceled() { #[test] fn cancel_sends() { - #[cfg(miri)] - const N: usize = 100; - #[cfg(not(miri))] - const N: usize = 20000; + const N: usize = if cfg!(miri) { 100 } else { 20000 }; let (tx, rx) = mpsc::channel::<Sender<_>>(); let t = thread::spawn(move || { |