Upgrade rust/crates/futures-io to 0.3.15
Test: make
Change-Id: Iace4d357d5204155a6f3b14b4b293ff166ae6e76
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index f3ad3ab..ec6442e 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
{
"git": {
- "sha1": "c91f8691672c7401b1923ab00bf138975c99391a"
+ "sha1": "fc080d153bc7bf00429ec5e2b91e2f21f2243846"
}
}
diff --git a/Cargo.toml b/Cargo.toml
index 0cf53b7..e7e5ce0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@
[package]
edition = "2018"
name = "futures-io"
-version = "0.3.13"
+version = "0.3.15"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
description = "The `AsyncRead`, `AsyncWrite`, `AsyncSeek`, and `AsyncBufRead` traits 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 2edbdc3..b4f5054 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,7 +1,7 @@
[package]
name = "futures-io"
edition = "2018"
-version = "0.3.13"
+version = "0.3.15"
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 64097af..bd6dff8 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/futures-io/futures-io-0.3.13.crate"
+ value: "https://static.crates.io/crates/futures-io/futures-io-0.3.15.crate"
}
- version: "0.3.13"
+ version: "0.3.15"
license_type: NOTICE
last_upgrade_date {
year: 2021
- month: 4
- day: 1
+ month: 5
+ day: 19
}
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 568eaf7..ff8b0c3 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -2,7 +2,19 @@
{
"presubmit": [
{
- "name": "anyhow_device_test_tests_test_repr"
+ "name": "ZipFuseTest"
+ },
+ {
+ "name": "anyhow_device_test_src_lib"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_autotrait"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_boxed"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_chain"
},
{
"name": "anyhow_device_test_tests_test_context"
@@ -11,9 +23,36 @@
"name": "anyhow_device_test_tests_test_convert"
},
{
+ "name": "anyhow_device_test_tests_test_downcast"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_ffi"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_fmt"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_macros"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_repr"
+ },
+ {
+ "name": "anyhow_device_test_tests_test_source"
+ },
+ {
+ "name": "authfs_device_test_src_lib"
+ },
+ {
"name": "futures-io_device_test_src_lib"
},
{
+ "name": "futures-util_device_test_src_lib"
+ },
+ {
+ "name": "tokio-test_device_test_src_lib"
+ },
+ {
"name": "tokio-test_device_test_tests_block_on"
},
{
@@ -23,37 +62,100 @@
"name": "tokio-test_device_test_tests_macros"
},
{
- "name": "anyhow_device_test_tests_test_downcast"
+ "name": "tokio_device_test_tests_buffered"
},
{
- "name": "anyhow_device_test_tests_test_fmt"
+ "name": "tokio_device_test_tests_io_async_read"
},
{
- "name": "futures-util_device_test_src_lib"
+ "name": "tokio_device_test_tests_io_copy_bidirectional"
},
{
- "name": "anyhow_device_test_tests_test_autotrait"
+ "name": "tokio_device_test_tests_io_lines"
},
{
- "name": "anyhow_device_test_src_lib"
+ "name": "tokio_device_test_tests_io_mem_stream"
},
{
- "name": "tokio-test_device_test_src_lib"
+ "name": "tokio_device_test_tests_io_read"
},
{
- "name": "anyhow_device_test_tests_test_source"
+ "name": "tokio_device_test_tests_io_read_buf"
},
{
- "name": "anyhow_device_test_tests_test_ffi"
+ "name": "tokio_device_test_tests_io_read_to_end"
},
{
- "name": "anyhow_device_test_tests_test_macros"
+ "name": "tokio_device_test_tests_io_take"
},
{
- "name": "anyhow_device_test_tests_test_chain"
+ "name": "tokio_device_test_tests_io_write"
},
{
- "name": "anyhow_device_test_tests_test_boxed"
+ "name": "tokio_device_test_tests_io_write_all"
+ },
+ {
+ "name": "tokio_device_test_tests_io_write_buf"
+ },
+ {
+ "name": "tokio_device_test_tests_io_write_int"
+ },
+ {
+ "name": "tokio_device_test_tests_macros_join"
+ },
+ {
+ "name": "tokio_device_test_tests_no_rt"
+ },
+ {
+ "name": "tokio_device_test_tests_rt_basic"
+ },
+ {
+ "name": "tokio_device_test_tests_rt_threaded"
+ },
+ {
+ "name": "tokio_device_test_tests_sync_barrier"
+ },
+ {
+ "name": "tokio_device_test_tests_sync_broadcast"
+ },
+ {
+ "name": "tokio_device_test_tests_sync_errors"
+ },
+ {
+ "name": "tokio_device_test_tests_sync_mpsc"
+ },
+ {
+ "name": "tokio_device_test_tests_sync_mutex_owned"
+ },
+ {
+ "name": "tokio_device_test_tests_sync_rwlock"
+ },
+ {
+ "name": "tokio_device_test_tests_sync_watch"
+ },
+ {
+ "name": "tokio_device_test_tests_task_local"
+ },
+ {
+ "name": "tokio_device_test_tests_task_local_set"
+ },
+ {
+ "name": "tokio_device_test_tests_tcp_accept"
+ },
+ {
+ "name": "tokio_device_test_tests_tcp_echo"
+ },
+ {
+ "name": "tokio_device_test_tests_tcp_into_std"
+ },
+ {
+ "name": "tokio_device_test_tests_tcp_shutdown"
+ },
+ {
+ "name": "tokio_device_test_tests_time_rt"
+ },
+ {
+ "name": "tokio_device_test_tests_uds_split"
}
]
}
diff --git a/src/lib.rs b/src/lib.rs
index 48de896..998042d 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -9,15 +9,12 @@
//! library is activated, and it is activated by default.
#![cfg_attr(all(feature = "read-initializer", feature = "std"), feature(read_initializer))]
-
#![cfg_attr(not(feature = "std"), no_std)]
-
#![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))]
#![warn(clippy::all)]
#![doc(test(attr(deny(warnings), allow(dead_code, unused_assignments, unused_variables))))]
-
#![cfg_attr(docsrs, feature(doc_cfg))]
#[cfg(all(feature = "read-initializer", not(feature = "unstable")))]
@@ -32,14 +29,14 @@
// Re-export some types from `std::io` so that users don't have to deal
// with conflicts when `use`ing `futures::io` and `std::io`.
- #[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
- #[doc(no_inline)]
- pub use io::{Error, ErrorKind, Result, IoSlice, IoSliceMut, SeekFrom};
#[cfg(feature = "read-initializer")]
#[cfg_attr(docsrs, doc(cfg(feature = "read-initializer")))]
#[doc(no_inline)]
#[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
pub use io::Initializer;
+ #[allow(unreachable_pub)] // https://github.com/rust-lang/rust/issues/57411
+ #[doc(no_inline)]
+ pub use io::{Error, ErrorKind, IoSlice, IoSliceMut, Result, SeekFrom};
/// Read bytes asynchronously.
///
@@ -85,8 +82,11 @@
/// `Interrupted`. Implementations must convert `WouldBlock` into
/// `Poll::Pending` and either internally retry or convert
/// `Interrupted` into another error kind.
- fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8])
- -> Poll<Result<usize>>;
+ fn poll_read(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ buf: &mut [u8],
+ ) -> Poll<Result<usize>>;
/// Attempt to read from the `AsyncRead` into `bufs` using vectored
/// IO operations.
@@ -110,9 +110,11 @@
/// `Interrupted`. Implementations must convert `WouldBlock` into
/// `Poll::Pending` and either internally retry or convert
/// `Interrupted` into another error kind.
- fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_read_vectored(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ bufs: &mut [IoSliceMut<'_>],
+ ) -> Poll<Result<usize>> {
for b in bufs {
if !b.is_empty() {
return self.poll_read(cx, b);
@@ -149,8 +151,11 @@
///
/// `poll_write` must try to make progress by flushing the underlying object if
/// that is the only way the underlying object can become writable again.
- fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8])
- -> Poll<Result<usize>>;
+ fn poll_write(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ buf: &[u8],
+ ) -> Poll<Result<usize>>;
/// Attempt to write bytes from `bufs` into the object using vectored
/// IO operations.
@@ -175,9 +180,11 @@
/// `Interrupted`. Implementations must convert `WouldBlock` into
/// `Poll::Pending` and either internally retry or convert
/// `Interrupted` into another error kind.
- fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_write_vectored(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ bufs: &[IoSlice<'_>],
+ ) -> Poll<Result<usize>> {
for b in bufs {
if !b.is_empty() {
return self.poll_write(cx, b);
@@ -252,8 +259,11 @@
/// `Interrupted`. Implementations must convert `WouldBlock` into
/// `Poll::Pending` and either internally retry or convert
/// `Interrupted` into another error kind.
- fn poll_seek(self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom)
- -> Poll<Result<u64>>;
+ fn poll_seek(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ pos: SeekFrom,
+ ) -> Poll<Result<u64>>;
}
/// Read bytes asynchronously.
@@ -292,8 +302,7 @@
/// `Interrupted`. Implementations must convert `WouldBlock` into
/// `Poll::Pending` and either internally retry or convert
/// `Interrupted` into another error kind.
- fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
- -> Poll<Result<&[u8]>>;
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>>;
/// Tells this buffer that `amt` bytes have been consumed from the buffer,
/// so they should no longer be returned in calls to [`poll_read`].
@@ -320,18 +329,22 @@
(**self).initializer()
}
- fn poll_read(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8])
- -> Poll<Result<usize>>
- {
+ fn poll_read(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ buf: &mut [u8],
+ ) -> Poll<Result<usize>> {
Pin::new(&mut **self).poll_read(cx, buf)
}
- fn poll_read_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_read_vectored(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ bufs: &mut [IoSliceMut<'_>],
+ ) -> Poll<Result<usize>> {
Pin::new(&mut **self).poll_read_vectored(cx, bufs)
}
- }
+ };
}
impl<T: ?Sized + AsyncRead + Unpin> AsyncRead for Box<T> {
@@ -352,15 +365,19 @@
(**self).initializer()
}
- fn poll_read(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut [u8])
- -> Poll<Result<usize>>
- {
+ fn poll_read(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ buf: &mut [u8],
+ ) -> Poll<Result<usize>> {
self.get_mut().as_mut().poll_read(cx, buf)
}
- fn poll_read_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_read_vectored(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ bufs: &mut [IoSliceMut<'_>],
+ ) -> Poll<Result<usize>> {
self.get_mut().as_mut().poll_read_vectored(cx, bufs)
}
}
@@ -372,18 +389,22 @@
io::Read::initializer(self)
}
- fn poll_read(mut self: Pin<&mut Self>, _: &mut Context<'_>, buf: &mut [u8])
- -> Poll<Result<usize>>
- {
+ fn poll_read(
+ mut self: Pin<&mut Self>,
+ _: &mut Context<'_>,
+ buf: &mut [u8],
+ ) -> Poll<Result<usize>> {
Poll::Ready(io::Read::read(&mut *self, buf))
}
- fn poll_read_vectored(mut self: Pin<&mut Self>, _: &mut Context<'_>, bufs: &mut [IoSliceMut<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_read_vectored(
+ mut self: Pin<&mut Self>,
+ _: &mut Context<'_>,
+ bufs: &mut [IoSliceMut<'_>],
+ ) -> Poll<Result<usize>> {
Poll::Ready(io::Read::read_vectored(&mut *self, bufs))
}
- }
+ };
}
impl AsyncRead for &[u8] {
@@ -392,15 +413,19 @@
macro_rules! deref_async_write {
() => {
- fn poll_write(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8])
- -> Poll<Result<usize>>
- {
+ fn poll_write(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ buf: &[u8],
+ ) -> Poll<Result<usize>> {
Pin::new(&mut **self).poll_write(cx, buf)
}
- fn poll_write_vectored(mut self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_write_vectored(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ bufs: &[IoSlice<'_>],
+ ) -> Poll<Result<usize>> {
Pin::new(&mut **self).poll_write_vectored(cx, bufs)
}
@@ -411,7 +436,7 @@
fn poll_close(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> {
Pin::new(&mut **self).poll_close(cx)
}
- }
+ };
}
impl<T: ?Sized + AsyncWrite + Unpin> AsyncWrite for Box<T> {
@@ -427,15 +452,19 @@
P: DerefMut + Unpin,
P::Target: AsyncWrite,
{
- fn poll_write(self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8])
- -> Poll<Result<usize>>
- {
+ fn poll_write(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ buf: &[u8],
+ ) -> Poll<Result<usize>> {
self.get_mut().as_mut().poll_write(cx, buf)
}
- fn poll_write_vectored(self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_write_vectored(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ bufs: &[IoSlice<'_>],
+ ) -> Poll<Result<usize>> {
self.get_mut().as_mut().poll_write_vectored(cx, bufs)
}
@@ -450,15 +479,19 @@
macro_rules! delegate_async_write_to_stdio {
() => {
- fn poll_write(mut self: Pin<&mut Self>, _: &mut Context<'_>, buf: &[u8])
- -> Poll<Result<usize>>
- {
+ fn poll_write(
+ mut self: Pin<&mut Self>,
+ _: &mut Context<'_>,
+ buf: &[u8],
+ ) -> Poll<Result<usize>> {
Poll::Ready(io::Write::write(&mut *self, buf))
}
- fn poll_write_vectored(mut self: Pin<&mut Self>, _: &mut Context<'_>, bufs: &[IoSlice<'_>])
- -> Poll<Result<usize>>
- {
+ fn poll_write_vectored(
+ mut self: Pin<&mut Self>,
+ _: &mut Context<'_>,
+ bufs: &[IoSlice<'_>],
+ ) -> Poll<Result<usize>> {
Poll::Ready(io::Write::write_vectored(&mut *self, bufs))
}
@@ -469,7 +502,7 @@
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>> {
self.poll_flush(cx)
}
- }
+ };
}
impl AsyncWrite for Vec<u8> {
@@ -478,12 +511,14 @@
macro_rules! deref_async_seek {
() => {
- fn poll_seek(mut self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom)
- -> Poll<Result<u64>>
- {
+ fn poll_seek(
+ mut self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ pos: SeekFrom,
+ ) -> Poll<Result<u64>> {
Pin::new(&mut **self).poll_seek(cx, pos)
}
- }
+ };
}
impl<T: ?Sized + AsyncSeek + Unpin> AsyncSeek for Box<T> {
@@ -499,25 +534,25 @@
P: DerefMut + Unpin,
P::Target: AsyncSeek,
{
- fn poll_seek(self: Pin<&mut Self>, cx: &mut Context<'_>, pos: SeekFrom)
- -> Poll<Result<u64>>
- {
+ fn poll_seek(
+ self: Pin<&mut Self>,
+ cx: &mut Context<'_>,
+ pos: SeekFrom,
+ ) -> Poll<Result<u64>> {
self.get_mut().as_mut().poll_seek(cx, pos)
}
}
macro_rules! deref_async_buf_read {
() => {
- fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
- -> Poll<Result<&[u8]>>
- {
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>> {
Pin::new(&mut **self.get_mut()).poll_fill_buf(cx)
}
fn consume(mut self: Pin<&mut Self>, amt: usize) {
Pin::new(&mut **self).consume(amt)
}
- }
+ };
}
impl<T: ?Sized + AsyncBufRead + Unpin> AsyncBufRead for Box<T> {
@@ -533,9 +568,7 @@
P: DerefMut + Unpin,
P::Target: AsyncBufRead,
{
- fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>)
- -> Poll<Result<&[u8]>>
- {
+ fn poll_fill_buf(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<&[u8]>> {
self.get_mut().as_mut().poll_fill_buf(cx)
}
@@ -546,16 +579,14 @@
macro_rules! delegate_async_buf_read_to_stdio {
() => {
- fn poll_fill_buf(self: Pin<&mut Self>, _: &mut Context<'_>)
- -> Poll<Result<&[u8]>>
- {
+ fn poll_fill_buf(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Result<&[u8]>> {
Poll::Ready(io::BufRead::fill_buf(self.get_mut()))
}
fn consume(self: Pin<&mut Self>, amt: usize) {
io::BufRead::consume(self.get_mut(), amt)
}
- }
+ };
}
impl AsyncBufRead for &[u8] {