aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:07:18 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-10 07:07:18 +0000
commit5d2c2f95a534b55753bcf6d04a607d523d6b5154 (patch)
tree293797d0942b5af981dc60556bb9012cfea101df
parent4c896b3cc626e4c39b67bcf64ec44742d3c498cf (diff)
parent56f4e4419574fa1ca251a9f3f69dbe893b5dd8ea (diff)
downloadfutures-sink-android13-mainline-conscrypt-release.tar.gz
Snap for 8564071 from 56f4e4419574fa1ca251a9f3f69dbe893b5dd8ea to mainline-conscrypt-releaseaml_con_331413000aml_con_331411000aml_con_331312000aml_con_331115000aml_con_331011010android13-mainline-conscrypt-release
Change-Id: I99e3ef1f1e3b9750276ac9bc5f7351dce9654bf1
-rw-r--r--.cargo_vcs_info.json7
-rw-r--r--Android.bp30
-rw-r--r--Cargo.toml19
-rw-r--r--Cargo.toml.orig5
-rw-r--r--METADATA8
-rw-r--r--README.md23
-rw-r--r--TEST_MAPPING52
-rw-r--r--cargo2android.json5
-rw-r--r--src/lib.rs26
9 files changed, 88 insertions, 87 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index f3ad3ab..aa92167 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,6 @@
{
"git": {
- "sha1": "c91f8691672c7401b1923ab00bf138975c99391a"
- }
-}
+ "sha1": "fc1e3250219170e31cddb8857a276cba7dd08d44"
+ },
+ "path_in_vcs": "futures-sink"
+} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index ec62b3d..da05036 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,37 +37,12 @@ license {
],
}
-rust_defaults {
- name: "futures-sink_defaults",
- crate_name: "futures_sink",
- srcs: ["src/lib.rs"],
- test_suites: ["general-tests"],
- auto_gen_config: true,
- edition: "2018",
- features: [
- "alloc",
- "default",
- "std",
- ],
-}
-
-rust_test_host {
- name: "futures-sink_host_test_src_lib",
- defaults: ["futures-sink_defaults"],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test {
- name: "futures-sink_device_test_src_lib",
- defaults: ["futures-sink_defaults"],
-}
-
rust_library {
name: "libfutures_sink",
host_supported: true,
crate_name: "futures_sink",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.3.21",
srcs: ["src/lib.rs"],
edition: "2018",
features: [
@@ -77,6 +52,7 @@ rust_library {
],
apex_available: [
"//apex_available:platform",
+ "com.android.bluetooth",
"com.android.resolv",
"com.android.virt",
],
diff --git a/Cargo.toml b/Cargo.toml
index e1a3ccd..2203c38 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,23 +3,24 @@
# 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.36"
name = "futures-sink"
-version = "0.3.13"
-authors = ["Alex Crichton <alex@alexcrichton.com>"]
-description = "The asynchronous `Sink` trait for the futures-rs library.\n"
+version = "0.3.21"
+description = """
+The asynchronous `Sink` trait for the futures-rs library.
+"""
homepage = "https://rust-lang.github.io/futures-rs"
-documentation = "https://docs.rs/futures-sink/0.3"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/futures-rs"
+
[package.metadata.docs.rs]
all-features = true
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 59853a9..2c0685a 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,12 +1,11 @@
[package]
name = "futures-sink"
+version = "0.3.21"
edition = "2018"
-version = "0.3.13"
-authors = ["Alex Crichton <alex@alexcrichton.com>"]
+rust-version = "1.36"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/futures-rs"
homepage = "https://rust-lang.github.io/futures-rs"
-documentation = "https://docs.rs/futures-sink/0.3"
description = """
The asynchronous `Sink` trait for the futures-rs library.
"""
diff --git a/METADATA b/METADATA
index d4681e3..27fe835 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/futures-sink/futures-sink-0.3.13.crate"
+ value: "https://static.crates.io/crates/futures-sink/futures-sink-0.3.21.crate"
}
- version: "0.3.13"
+ version: "0.3.21"
license_type: NOTICE
last_upgrade_date {
- year: 2021
- month: 4
+ year: 2022
+ month: 3
day: 1
}
}
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..1d683e9
--- /dev/null
+++ b/README.md
@@ -0,0 +1,23 @@
+# futures-sink
+
+The asynchronous `Sink` trait for the futures-rs library.
+
+## Usage
+
+Add this to your `Cargo.toml`:
+
+```toml
+[dependencies]
+futures-sink = "0.3"
+```
+
+The current `futures-sink` requires Rust 1.36 or later.
+
+## License
+
+Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or
+[MIT license](LICENSE-MIT) at your option.
+
+Unless you explicitly state otherwise, any contribution intentionally submitted
+for inclusion in the work by you, as defined in the Apache-2.0 license, shall
+be dual licensed as above, without any additional terms or conditions.
diff --git a/TEST_MAPPING b/TEST_MAPPING
index a20d8a9..5ef61de 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,59 +1,45 @@
// Generated by update_crate_tests.py for tests that depend on this crate.
{
- "presubmit": [
- {
- "name": "anyhow_device_test_tests_test_context"
- },
- {
- "name": "tokio-test_device_test_tests_macros"
- },
- {
- "name": "futures-sink_device_test_src_lib"
- },
- {
- "name": "anyhow_device_test_tests_test_convert"
- },
+ "imports": [
{
- "name": "tokio-test_device_test_tests_block_on"
+ "path": "external/rust/crates/anyhow"
},
{
- "name": "anyhow_device_test_tests_test_macros"
+ "path": "external/rust/crates/futures-util"
},
{
- "name": "anyhow_device_test_src_lib"
+ "path": "external/rust/crates/tokio"
},
{
- "name": "anyhow_device_test_tests_test_ffi"
- },
- {
- "name": "anyhow_device_test_tests_test_downcast"
- },
- {
- "name": "anyhow_device_test_tests_test_source"
- },
+ "path": "external/rust/crates/tokio-test"
+ }
+ ],
+ "presubmit": [
{
- "name": "anyhow_device_test_tests_test_autotrait"
+ "name": "ZipFuseTest"
},
{
- "name": "anyhow_device_test_tests_test_fmt"
+ "name": "authfs_device_test_src_lib"
},
{
- "name": "futures-util_device_test_src_lib"
+ "name": "doh_unit_test"
},
{
- "name": "tokio-test_device_test_src_lib"
- },
+ "name": "virtualizationservice_device_test"
+ }
+ ],
+ "presubmit-rust": [
{
- "name": "anyhow_device_test_tests_test_chain"
+ "name": "ZipFuseTest"
},
{
- "name": "tokio-test_device_test_tests_io"
+ "name": "authfs_device_test_src_lib"
},
{
- "name": "anyhow_device_test_tests_test_repr"
+ "name": "doh_unit_test"
},
{
- "name": "anyhow_device_test_tests_test_boxed"
+ "name": "virtualizationservice_device_test"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
index 44e747c..5b266a6 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,12 +1,13 @@
{
"apex-available": [
"//apex_available:platform",
+ "com.android.bluetooth",
"com.android.resolv",
"com.android.virt"
],
- "min_sdk_version": "29",
"dependencies": true,
"device": true,
+ "min-sdk-version": "29",
"run": true,
"tests": true
-} \ No newline at end of file
+}
diff --git a/src/lib.rs b/src/lib.rs
index 6193f51..0328740 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -4,11 +4,16 @@
//! asynchronously.
#![cfg_attr(not(feature = "std"), no_std)]
-#![warn(missing_docs, missing_debug_implementations, rust_2018_idioms, unreachable_pub)]
+#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)]
// It cannot be included in the published code because this lints have false positives in the minimum required version.
#![cfg_attr(test, warn(single_use_lifetimes))]
-#![warn(clippy::all)]
-#![doc(test(attr(deny(warnings), allow(dead_code, unused_assignments, unused_variables))))]
+#![doc(test(
+ no_crate_inject,
+ attr(
+ deny(warnings, rust_2018_idioms, single_use_lifetimes),
+ allow(dead_code, unused_assignments, unused_variables)
+ )
+))]
#[cfg(feature = "alloc")]
extern crate alloc;
@@ -207,7 +212,10 @@ mod if_alloc {
impl<S: ?Sized + Sink<Item> + Unpin, Item> Sink<Item> for alloc::boxed::Box<S> {
type Error = S::Error;
- fn poll_ready(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ fn poll_ready(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ ) -> Poll<Result<(), Self::Error>> {
Pin::new(&mut **self).poll_ready(cx)
}
@@ -215,11 +223,17 @@ mod if_alloc {
Pin::new(&mut **self).start_send(item)
}
- fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ fn poll_flush(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ ) -> Poll<Result<(), Self::Error>> {
Pin::new(&mut **self).poll_flush(cx)
}
- fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>> {
+ fn poll_close(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ ) -> Poll<Result<(), Self::Error>> {
Pin::new(&mut **self).poll_close(cx)
}
}