mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-08 12:51:29 +00:00
websocket: remove AsyncReadExt
style wise, bounds should refer to AsyncRead instead also we don't actually use any of the Ext methods Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
31402407c4
commit
6eef946e20
@ -16,7 +16,7 @@ use hyper::header::{
|
|||||||
SEC_WEBSOCKET_PROTOCOL, SEC_WEBSOCKET_VERSION, UPGRADE,
|
SEC_WEBSOCKET_PROTOCOL, SEC_WEBSOCKET_VERSION, UPGRADE,
|
||||||
};
|
};
|
||||||
use hyper::{Body, Response, StatusCode};
|
use hyper::{Body, Response, StatusCode};
|
||||||
use tokio::io::{AsyncRead, AsyncReadExt, AsyncWrite, AsyncWriteExt, ReadBuf};
|
use tokio::io::{AsyncRead, AsyncWrite, AsyncWriteExt, ReadBuf};
|
||||||
use tokio::sync::mpsc;
|
use tokio::sync::mpsc;
|
||||||
|
|
||||||
use futures::future::FutureExt;
|
use futures::future::FutureExt;
|
||||||
@ -485,7 +485,7 @@ pub struct WebSocketReader<R: AsyncRead> {
|
|||||||
state: ReaderState<R>,
|
state: ReaderState<R>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<R: AsyncReadExt> WebSocketReader<R> {
|
impl<R: AsyncRead> WebSocketReader<R> {
|
||||||
/// Creates a new WebSocketReader with the given CallBack for control frames
|
/// Creates a new WebSocketReader with the given CallBack for control frames
|
||||||
/// and a default buffer size of 4096.
|
/// and a default buffer size of 4096.
|
||||||
pub fn new(
|
pub fn new(
|
||||||
@ -524,7 +524,7 @@ enum ReaderState<R> {
|
|||||||
|
|
||||||
unsafe impl<R: Sync> Sync for ReaderState<R> {}
|
unsafe impl<R: Sync> Sync for ReaderState<R> {}
|
||||||
|
|
||||||
impl<R: AsyncReadExt + Unpin + Send + 'static> AsyncRead for WebSocketReader<R> {
|
impl<R: AsyncRead + Unpin + Send + 'static> AsyncRead for WebSocketReader<R> {
|
||||||
fn poll_read(
|
fn poll_read(
|
||||||
self: Pin<&mut Self>,
|
self: Pin<&mut Self>,
|
||||||
cx: &mut Context,
|
cx: &mut Context,
|
||||||
|
Loading…
Reference in New Issue
Block a user