Relax implicit R: Sized bound on BufReader<R>
This commit is contained in:
parent
b7d8c88b64
commit
e77b14e2ac
3 changed files with 17 additions and 14 deletions
|
|
@ -466,7 +466,7 @@ impl<T: CopyRead> CopyRead for Take<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: CopyRead> CopyRead for BufReader<T> {
|
||||
impl<T: ?Sized + CopyRead> CopyRead for BufReader<T> {
|
||||
fn drain_to<W: Write>(&mut self, writer: &mut W, outer_limit: u64) -> Result<u64> {
|
||||
let buf = self.buffer();
|
||||
let buf = &buf[0..min(buf.len(), outer_limit.try_into().unwrap_or(usize::MAX))];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue