mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-17 23:07:55 +00:00
agent: Fix clippy error
``` error: bound is defined in more than one place ``` Move Sized into the later definition of `R` & `W` rather than defining them in two places Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
@@ -18,14 +18,14 @@ const BUF_SIZE: usize = 8192;
|
||||
|
||||
// Interruptable I/O copy using readers and writers
|
||||
// (an interruptable version of "io::copy()").
|
||||
pub async fn interruptable_io_copier<R: Sized, W: Sized>(
|
||||
pub async fn interruptable_io_copier<R, W>(
|
||||
mut reader: R,
|
||||
mut writer: W,
|
||||
mut shutdown: Receiver<bool>,
|
||||
) -> io::Result<u64>
|
||||
where
|
||||
R: tokio::io::AsyncRead + Unpin,
|
||||
W: tokio::io::AsyncWrite + Unpin,
|
||||
R: tokio::io::AsyncRead + Unpin + Sized,
|
||||
W: tokio::io::AsyncWrite + Unpin + Sized,
|
||||
{
|
||||
let mut total_bytes: u64 = 0;
|
||||
|
||||
|
Reference in New Issue
Block a user