mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-18 02:01:09 +00:00
compile fixups
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
4f05a5d9f7
commit
aea0abf838
@ -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"]
|
||||
|
@ -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);
|
||||
|
@ -20,7 +20,7 @@ pub mod time;
|
||||
pub mod uuid;
|
||||
pub mod vec;
|
||||
|
||||
#[cfg(features = "websocket")]
|
||||
#[cfg(feature = "websocket")]
|
||||
pub mod websocket;
|
||||
|
||||
#[doc(inline)]
|
||||
|
Loading…
Reference in New Issue
Block a user