Snap for 6533464 from 0f7a0c64fdf057541925e7f8c982bfb11c37b9ec to sdk-release
Change-Id: Iade1fcccff8fd8307265553931299eb49a0159f6
diff --git a/Cargo.toml b/Cargo.toml
index 5aee74c..183feb5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,11 +13,11 @@
[package]
edition = "2018"
name = "futures-io"
-version = "0.3.4"
+version = "0.3.5"
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"
-documentation = "https://docs.rs/futures-io/0.3.0"
+documentation = "https://docs.rs/futures-io/0.3.5"
license = "MIT OR Apache-2.0"
repository = "https://github.com/rust-lang/futures-rs"
[package.metadata.docs.rs]
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 76f2565..de0385d 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,12 +1,12 @@
[package]
name = "futures-io"
edition = "2018"
-version = "0.3.4"
+version = "0.3.5"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
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-io/0.3.0"
+documentation = "https://docs.rs/futures-io/0.3.5"
description = """
The `AsyncRead`, `AsyncWrite`, `AsyncSeek`, and `AsyncBufRead` traits for the futures-rs library.
"""
diff --git a/METADATA b/METADATA
index 99ccebd..370b021 100644
--- a/METADATA
+++ b/METADATA
@@ -1,8 +1,5 @@
name: "futures-io"
-description:
- "The `AsyncRead`, `AsyncWrite`, `AsyncSeek`, and `AsyncBufRead` traits for "
- "the futures-rs library."
-
+description: "The `AsyncRead`, `AsyncWrite`, `AsyncSeek`, and `AsyncBufRead` traits for the futures-rs library."
third_party {
url {
type: HOMEPAGE
@@ -12,7 +9,11 @@
type: GIT
value: "https://github.com/rust-lang/futures-rs"
}
- version: "0.3.4"
- last_upgrade_date { year: 2020 month: 3 day: 17 }
+ version: "0.3.5"
license_type: NOTICE
+ last_upgrade_date {
+ year: 2020
+ month: 5
+ day: 8
+ }
}
diff --git a/src/lib.rs b/src/lib.rs
index 34fb241..2a7d8e1 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -19,7 +19,7 @@
#![doc(test(attr(deny(warnings), allow(dead_code, unused_assignments, unused_variables))))]
-#![doc(html_root_url = "https://docs.rs/futures-io/0.3.0")]
+#![doc(html_root_url = "https://docs.rs/futures-io/0.3.5")]
#[cfg(all(feature = "read-initializer", not(feature = "unstable")))]
compile_error!("The `read-initializer` feature requires the `unstable` feature as an explicit opt-in to unstable features");
@@ -133,7 +133,7 @@
/// This trait is analogous to the `std::io::Write` trait, but integrates
/// with the asynchronous task system. In particular, the `poll_write`
/// method, unlike `Write::write`, will automatically queue the current task
- /// for wakeup and return if data is not yet available, rather than blocking
+ /// for wakeup and return if the writer cannot take more data, rather than blocking
/// the calling thread.
pub trait AsyncWrite {
/// Attempt to write bytes from `buf` into the object.
@@ -151,6 +151,9 @@
/// `Interrupted`. Implementations must convert `WouldBlock` into
/// `Poll::Pending` and either internally retry or convert
/// `Interrupted` into another error kind.
+ ///
+ /// `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>>;
@@ -205,6 +208,8 @@
/// `Interrupted`. Implementations must convert `WouldBlock` into
/// `Poll::Pending` and either internally retry or convert
/// `Interrupted` into another error kind.
+ ///
+ /// It only makes sense to do anything here if you actually buffer data.
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<()>>;
/// Attempt to close the object.