mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-17 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))]
|
||||
pub fn poll_read_buf<T: AsyncRead, B: BufMut>(
|
||||
pub fn poll_read_buf<T: AsyncRead + ?Sized, B: BufMut>(
|
||||
io: Pin<&mut T>,
|
||||
cx: &mut Context<'_>,
|
||||
buf: &mut B,
|
||||
@@ -120,7 +120,7 @@ pub fn poll_read_buf<T: AsyncRead, B: BufMut>(
|
||||
/// [`File`]: tokio::fs::File
|
||||
/// [vectored writes]: tokio::io::AsyncWrite::poll_write_vectored
|
||||
#[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>,
|
||||
cx: &mut Context<'_>,
|
||||
buf: &mut B,
|
||||
|
||||
Reference in New Issue
Block a user