compile fixups

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2020-07-07 14:43:47 +02:00
parent 4f05a5d9f7
commit aea0abf838
3 changed files with 4 additions and 4 deletions

View File

@ -57,7 +57,7 @@ api-macro = ["proxmox-api-macro"]
test-harness = []
cli = [ "router", "hyper", "tokio" ]
router = [ "hyper", "tokio" ]
websocket = [ "tokio" ]
websocket = [ "tokio", "futures" ]
# tools:
#valgrind = ["proxmox-tools/valgrind"]

View File

@ -21,7 +21,7 @@ use std::io::{Read, Result};
use crate::tools::vec;
#[cfg(features = "tokio")]
#[cfg(feature = "tokio")]
use tokio::io::{AsyncRead, AsyncReadExt};
/// A Buffer that holds bytes (u8)
@ -160,7 +160,7 @@ impl ByteBuffer {
/// Same as read_from, but for reader that implement tokio::io::AsyncRead.
/// See [read_from](#method.read_from) for an example
#[cfg(features = "tokio")]
#[cfg(feature = "tokio")]
pub async fn read_from_async<T: AsyncRead + Unpin>(&mut self, input: &mut T) -> Result<usize> {
let amount = input.read(self.get_free_mut_slice()).await?;
self.add_size(amount);

View File

@ -20,7 +20,7 @@ pub mod time;
pub mod uuid;
pub mod vec;
#[cfg(features = "websocket")]
#[cfg(feature = "websocket")]
pub mod websocket;
#[doc(inline)]