diff options
author | Carl Lerche <me@carllerche.com> | 2019-11-05 23:38:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-05 23:38:52 -0800 |
commit | 0da23aad772afb22db8edf73ac0f034c5ada3bde (patch) | |
tree | acebe4125a39a5ee81815b19587ffad400559bb8 /tokio/src/io | |
parent | d5c1119c881c9a8b511aa9000fd26b9bda014256 (diff) |
fix clippy (#1737)
Diffstat (limited to 'tokio/src/io')
-rw-r--r-- | tokio/src/io/async_read.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tokio/src/io/async_read.rs b/tokio/src/io/async_read.rs index 2bccb17f..8f6e0b98 100644 --- a/tokio/src/io/async_read.rs +++ b/tokio/src/io/async_read.rs @@ -57,6 +57,11 @@ pub trait AsyncRead { /// /// This function is called from [`poll_read_buf`]. /// + /// # Safety + /// + /// Implementations that return `false` must never read from data slices + /// that they did not write to. + /// /// [`io::Read`]: std::io::Read /// [`poll_read_buf`]: #method.poll_read_buf unsafe fn prepare_uninitialized_buffer(&self, buf: &mut [u8]) -> bool { |