From 2aeeb83203be51efe70469b262f084e77043011e Mon Sep 17 00:00:00 2001 From: Wolfgang Bumiller Date: Tue, 7 Jul 2020 09:37:24 +0200 Subject: [PATCH] ByteBuffer: use T: AsyncRead, not AsyncReadExt it's just weird otherwise Signed-off-by: Wolfgang Bumiller --- proxmox/src/tools/byte_buffer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxmox/src/tools/byte_buffer.rs b/proxmox/src/tools/byte_buffer.rs index fe6a8c9d..cda04284 100644 --- a/proxmox/src/tools/byte_buffer.rs +++ b/proxmox/src/tools/byte_buffer.rs @@ -21,7 +21,7 @@ use std::io::{Read, Result}; use crate::tools::vec; -use tokio::io::AsyncReadExt; +use tokio::io::{AsyncRead, AsyncReadExt}; /// A Buffer that holds bytes (u8) /// has convenience methods for reading (with any reader that @@ -159,7 +159,7 @@ impl ByteBuffer { /// Same as read_from, but for reader that implement tokio::io::AsyncRead. /// See [read_from](#method.read_from) for an example - pub async fn read_from_async(&mut self, input: &mut T) -> Result { + pub async fn read_from_async(&mut self, input: &mut T) -> Result { let amount = input.read(self.get_free_mut_slice()).await?; self.add_size(amount); Ok(amount)