diff --git a/proxmox/Cargo.toml b/proxmox/Cargo.toml index b1485b77..008b23c0 100644 --- a/proxmox/Cargo.toml +++ b/proxmox/Cargo.toml @@ -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"] diff --git a/proxmox/src/tools/byte_buffer.rs b/proxmox/src/tools/byte_buffer.rs index 54f03dd1..abfa6c8a 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; -#[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(&mut self, input: &mut T) -> Result { let amount = input.read(self.get_free_mut_slice()).await?; self.add_size(amount); diff --git a/proxmox/src/tools/mod.rs b/proxmox/src/tools/mod.rs index b6018c47..bc2622b6 100644 --- a/proxmox/src/tools/mod.rs +++ b/proxmox/src/tools/mod.rs @@ -20,7 +20,7 @@ pub mod time; pub mod uuid; pub mod vec; -#[cfg(features = "websocket")] +#[cfg(feature = "websocket")] pub mod websocket; #[doc(inline)]