aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-16 08:11:58 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-16 08:11:58 +0000
commitd6e83a2b94a4734b92baba79fcfc05b93f54f6ac (patch)
tree9ddb136169684ec5cdfa46a94a5ee34e8e217120
parentd44ea4490f2e4976b4da052cbd9928dea005a334 (diff)
parent4c896b3cc626e4c39b67bcf64ec44742d3c498cf (diff)
downloadfutures-sink-d6e83a2b94a4734b92baba79fcfc05b93f54f6ac.tar.gz
Snap for 8189365 from 4c896b3cc626e4c39b67bcf64ec44742d3c498cf to tm-frc-permission-release
Change-Id: I4be1d69be71874aa56c6443d0b2c5fd0f9ab8717
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp30
-rw-r--r--Cargo.toml11
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA8
-rw-r--r--TEST_MAPPING52
-rw-r--r--cargo2android.json5
-rw-r--r--src/lib.rs26
8 files changed, 80 insertions, 56 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index ffd4f55..f3ad3ab 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "7caefa51304e78fd5018cd5d2a03f3b9089cc010"
+ "sha1": "c91f8691672c7401b1923ab00bf138975c99391a"
}
}
diff --git a/Android.bp b/Android.bp
index 1db9f5a..ec62b3d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -37,12 +37,37 @@ 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.17",
srcs: ["src/lib.rs"],
edition: "2018",
features: [
@@ -52,7 +77,6 @@ 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 824c97b..e1a3ccd 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,16 +3,17 @@
# 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 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.
+# 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)
[package]
edition = "2018"
name = "futures-sink"
-version = "0.3.17"
+version = "0.3.13"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
description = "The asynchronous `Sink` trait for the futures-rs library.\n"
homepage = "https://rust-lang.github.io/futures-rs"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index c5d5681..59853a9 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,7 @@
[package]
name = "futures-sink"
edition = "2018"
-version = "0.3.17"
+version = "0.3.13"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/futures-rs"
diff --git a/METADATA b/METADATA
index aed75cb..d4681e3 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.17.crate"
+ value: "https://static.crates.io/crates/futures-sink/futures-sink-0.3.13.crate"
}
- version: "0.3.17"
+ version: "0.3.13"
license_type: NOTICE
last_upgrade_date {
year: 2021
- month: 9
- day: 22
+ month: 4
+ day: 1
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 5ef61de..a20d8a9 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,45 +1,59 @@
// Generated by update_crate_tests.py for tests that depend on this crate.
{
- "imports": [
+ "presubmit": [
{
- "path": "external/rust/crates/anyhow"
+ "name": "anyhow_device_test_tests_test_context"
},
{
- "path": "external/rust/crates/futures-util"
+ "name": "tokio-test_device_test_tests_macros"
},
{
- "path": "external/rust/crates/tokio"
+ "name": "futures-sink_device_test_src_lib"
},
{
- "path": "external/rust/crates/tokio-test"
- }
- ],
- "presubmit": [
+ "name": "anyhow_device_test_tests_test_convert"
+ },
{
- "name": "ZipFuseTest"
+ "name": "tokio-test_device_test_tests_block_on"
},
{
- "name": "authfs_device_test_src_lib"
+ "name": "anyhow_device_test_tests_test_macros"
},
{
- "name": "doh_unit_test"
+ "name": "anyhow_device_test_src_lib"
},
{
- "name": "virtualizationservice_device_test"
- }
- ],
- "presubmit-rust": [
+ "name": "anyhow_device_test_tests_test_ffi"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_downcast"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_source"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_autotrait"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_fmt"
+ },
+ {
+ "name": "futures-util_device_test_src_lib"
+ },
+ {
+ "name": "tokio-test_device_test_src_lib"
+ },
{
- "name": "ZipFuseTest"
+ "name": "anyhow_device_test_tests_test_chain"
},
{
- "name": "authfs_device_test_src_lib"
+ "name": "tokio-test_device_test_tests_io"
},
{
- "name": "doh_unit_test"
+ "name": "anyhow_device_test_tests_test_repr"
},
{
- "name": "virtualizationservice_device_test"
+ "name": "anyhow_device_test_tests_test_boxed"
}
]
}
diff --git a/cargo2android.json b/cargo2android.json
index 5b266a6..44e747c 100644
--- a/cargo2android.json
+++ b/cargo2android.json
@@ -1,13 +1,12 @@
{
"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 0328740..6193f51 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -4,16 +4,11 @@
//! asynchronously.
#![cfg_attr(not(feature = "std"), no_std)]
-#![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)]
+#![warn(missing_docs, missing_debug_implementations, 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))]
-#![doc(test(
- no_crate_inject,
- attr(
- deny(warnings, rust_2018_idioms, single_use_lifetimes),
- allow(dead_code, unused_assignments, unused_variables)
- )
-))]
+#![warn(clippy::all)]
+#![doc(test(attr(deny(warnings), allow(dead_code, unused_assignments, unused_variables))))]
#[cfg(feature = "alloc")]
extern crate alloc;
@@ -212,10 +207,7 @@ 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)
}
@@ -223,17 +215,11 @@ 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)
}
}