Add missing ?Sized bound in read_line
This commit is contained in:
parent
692d8bb813
commit
32c67381df
@ -127,7 +127,10 @@ pub trait AsyncBufReadExt: AsyncBufRead {
|
||||
|
||||
impl<R: AsyncBufRead + ?Sized> AsyncBufReadExt for R {}
|
||||
|
||||
pub async fn read_line<R: AsyncBufRead + Unpin>(r: &mut R, buf: &mut [u8]) -> Result<usize> {
|
||||
pub async fn read_line<R: AsyncBufRead + Unpin + ?Sized>(
|
||||
r: &mut R,
|
||||
buf: &mut [u8],
|
||||
) -> Result<usize> {
|
||||
r.skip_while(|b| b == b'\r' || b == b'\n').await?;
|
||||
let n = r.read_while(buf, |b| b != b'\r' && b != b'\n').await?;
|
||||
r.skip_while(|b| b == b'\r').await?;
|
||||
|
Loading…
Reference in New Issue
Block a user