mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00
io: add T: ?Sized
to tokio_util::io::poll_read_buf
(#6441)
This commit is contained in:
parent
3936ebdfe4
commit
1fcb77db34
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user