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:
stevenhorsman
2025-01-28 15:15:03 +00:00
parent 7709198c3b
commit 0bd36a63d9

View File

@@ -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;