mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
io: add T: ?Sized to tokio_util::io::poll_read_buf (#6441)
This commit is contained in:
@@ -46,7 +46,7 @@ use std::task::{Context, Poll};
|
|||||||
/// # }
|
/// # }
|
||||||
/// ```
|
/// ```
|
||||||
#[cfg_attr(not(feature = "io"), allow(unreachable_pub))]
|
#[cfg_attr(not(feature = "io"), allow(unreachable_pub))]
|
||||||
pub fn poll_read_buf<T: AsyncRead, B: BufMut>(
|
pub fn poll_read_buf<T: AsyncRead + ?Sized, B: BufMut>(
|
||||||
io: Pin<&mut T>,
|
io: Pin<&mut T>,
|
||||||
cx: &mut Context<'_>,
|
cx: &mut Context<'_>,
|
||||||
buf: &mut B,
|
buf: &mut B,
|
||||||
@@ -120,7 +120,7 @@ pub fn poll_read_buf<T: AsyncRead, B: BufMut>(
|
|||||||
/// [`File`]: tokio::fs::File
|
/// [`File`]: tokio::fs::File
|
||||||
/// [vectored writes]: tokio::io::AsyncWrite::poll_write_vectored
|
/// [vectored writes]: tokio::io::AsyncWrite::poll_write_vectored
|
||||||
#[cfg_attr(not(feature = "io"), allow(unreachable_pub))]
|
#[cfg_attr(not(feature = "io"), allow(unreachable_pub))]
|
||||||
pub fn poll_write_buf<T: AsyncWrite, B: Buf>(
|
pub fn poll_write_buf<T: AsyncWrite + ?Sized, B: Buf>(
|
||||||
io: Pin<&mut T>,
|
io: Pin<&mut T>,
|
||||||
cx: &mut Context<'_>,
|
cx: &mut Context<'_>,
|
||||||
buf: &mut B,
|
buf: &mut B,
|
||||||
|
|||||||
Reference in New Issue
Block a user