From d0ef03e029189686f691b893d30eb8756174aa55 Mon Sep 17 00:00:00 2001 From: Toshit Chawda Date: Tue, 29 Oct 2024 19:59:40 -0700 Subject: [PATCH] src/inner.rs -> src/mux/inner.rs --- wisp/src/lib.rs | 1 - wisp/src/mux/client.rs | 7 ++++--- wisp/src/{ => mux}/inner.rs | 0 wisp/src/mux/mod.rs | 1 + wisp/src/mux/server.rs | 7 ++++--- wisp/src/stream/mod.rs | 4 +--- 6 files changed, 10 insertions(+), 10 deletions(-) rename wisp/src/{ => mux}/inner.rs (100%) diff --git a/wisp/src/lib.rs b/wisp/src/lib.rs index ff4e14b..b7db15c 100644 --- a/wisp/src/lib.rs +++ b/wisp/src/lib.rs @@ -11,7 +11,6 @@ mod fastwebsockets; #[cfg(feature = "generic_stream")] #[cfg_attr(docsrs, doc(cfg(feature = "generic_stream")))] pub mod generic; -mod inner; mod mux; mod packet; mod stream; diff --git a/wisp/src/mux/client.rs b/wisp/src/mux/client.rs index 5b44766..750a4c5 100644 --- a/wisp/src/mux/client.rs +++ b/wisp/src/mux/client.rs @@ -11,7 +11,6 @@ use futures::channel::oneshot; use crate::{ extensions::{udp::UdpProtocolExtension, AnyProtocolExtension}, - inner::{MuxInner, WsEvent}, mux::send_info_packet, ws::{AppendingWebSocketRead, LockedWebSocketWrite, Payload, WebSocketRead, WebSocketWrite}, CloseReason, MuxProtocolExtensionStream, MuxStream, Packet, PacketType, Role, StreamType, @@ -19,8 +18,10 @@ use crate::{ }; use super::{ - get_supported_extensions, validate_continue_packet, Multiplexor, MuxResult, - WispHandshakeResult, WispHandshakeResultKind, WispV2Handshake, + get_supported_extensions, + inner::{MuxInner, WsEvent}, + validate_continue_packet, Multiplexor, MuxResult, WispHandshakeResult, WispHandshakeResultKind, + WispV2Handshake, }; async fn handshake( diff --git a/wisp/src/inner.rs b/wisp/src/mux/inner.rs similarity index 100% rename from wisp/src/inner.rs rename to wisp/src/mux/inner.rs diff --git a/wisp/src/mux/mod.rs b/wisp/src/mux/mod.rs index 8b97ef3..e947908 100644 --- a/wisp/src/mux/mod.rs +++ b/wisp/src/mux/mod.rs @@ -1,4 +1,5 @@ mod client; +pub(crate) mod inner; mod server; use std::{future::Future, pin::Pin}; diff --git a/wisp/src/mux/server.rs b/wisp/src/mux/server.rs index edca6a4..974c87e 100644 --- a/wisp/src/mux/server.rs +++ b/wisp/src/mux/server.rs @@ -11,15 +11,16 @@ use futures::channel::oneshot; use crate::{ extensions::AnyProtocolExtension, - inner::{MuxInner, WsEvent}, ws::{AppendingWebSocketRead, LockedWebSocketWrite, Payload, WebSocketRead, WebSocketWrite}, CloseReason, ConnectPacket, MuxProtocolExtensionStream, MuxStream, Packet, PacketType, Role, WispError, }; use super::{ - get_supported_extensions, send_info_packet, Multiplexor, MuxResult, WispHandshakeResult, - WispHandshakeResultKind, WispV2Handshake, + get_supported_extensions, + inner::{MuxInner, WsEvent}, + send_info_packet, Multiplexor, MuxResult, WispHandshakeResult, WispHandshakeResultKind, + WispV2Handshake, }; async fn handshake( diff --git a/wisp/src/stream/mod.rs b/wisp/src/stream/mod.rs index ff0828a..7635a7f 100644 --- a/wisp/src/stream/mod.rs +++ b/wisp/src/stream/mod.rs @@ -3,9 +3,7 @@ mod sink_unfold; pub use compat::*; use crate::{ - inner::WsEvent, - ws::{Frame, LockedWebSocketWrite, Payload}, - AtomicCloseReason, CloseReason, Packet, Role, StreamType, WispError, + inner::WsEvent, ws::{Frame, LockedWebSocketWrite, Payload}, AtomicCloseReason, CloseReason, Packet, Role, StreamType, WispError }; use bytes::{BufMut, Bytes, BytesMut};