diff --git a/src/bin/pushpin-connmgr.rs b/src/bin/pushpin-connmgr.rs index 5722694e..d65f3288 100644 --- a/src/bin/pushpin-connmgr.rs +++ b/src/bin/pushpin-connmgr.rs @@ -18,7 +18,7 @@ use clap::{Arg, ArgAction, Command}; use log::{error, LevelFilter}; use pushpin::connmgr::{run, App, Config}; -use pushpin::log::{get_simple_logger, local_offset_check}; +use pushpin::core::log::{get_simple_logger, local_offset_check}; use pushpin::version; use pushpin::{ListenConfig, ListenSpec}; use std::error::Error; diff --git a/src/bin/pushpin.rs b/src/bin/pushpin.rs index c15c5596..24217264 100644 --- a/src/bin/pushpin.rs +++ b/src/bin/pushpin.rs @@ -16,7 +16,7 @@ use clap::Parser; use log::{error, info, LevelFilter}; -use pushpin::log::{ensure_init_simple_logger, get_simple_logger, local_offset_check}; +use pushpin::core::log::{ensure_init_simple_logger, get_simple_logger, local_offset_check}; use pushpin::runner::{open_log_file, ArgsData, CliArgs, Settings}; use pushpin::service::start_services; use std::env; diff --git a/src/client.rs b/src/client.rs index 0db89221..6c9a1f61 100644 --- a/src/client.rs +++ b/src/client.rs @@ -15,29 +15,28 @@ * limitations under the License. */ -use crate::arena; -use crate::buffer::TmpBuffer; use crate::can_move_mio_sockets_between_threads; -use crate::channel; use crate::connection::{ client_req_connection, client_stream_connection, ConnectionPool, StreamSharedData, }; +use crate::core::arena; +use crate::core::buffer::TmpBuffer; +use crate::core::channel; +use crate::core::event; +use crate::core::executor::{Executor, Spawner}; +use crate::core::list; +use crate::core::reactor::Reactor; +use crate::core::tnetstring; +use crate::core::zmq::{MultipartHeader, SpecInfo}; use crate::counter::Counter; -use crate::event; -use crate::executor::{Executor, Spawner}; use crate::future::{ event_wait, select_2, select_5, select_6, select_option, yield_to_local_events, AsyncLocalReceiver, AsyncLocalSender, AsyncReceiver, CancellationSender, CancellationToken, Select2, Select5, Select6, Timeout, }; -use crate::list; -use crate::pin; -use crate::reactor::Reactor; use crate::resolver::Resolver; -use crate::tnetstring; use crate::zhttppacket; use crate::zhttpsocket::{self, SessionKey, FROM_MAX, REQ_ID_MAX}; -use crate::zmq::{MultipartHeader, SpecInfo}; use arrayvec::ArrayVec; use ipnet::IpNet; use log::{debug, error, info, warn}; @@ -49,6 +48,7 @@ use std::collections::{HashMap, VecDeque}; use std::convert::TryFrom; use std::io::{self, Write}; use std::mem; +use std::pin::pin; use std::rc::Rc; use std::str; use std::sync::{mpsc, Arc}; diff --git a/src/connection.rs b/src/connection.rs index 5dfc2bd4..bd7e9152 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -34,12 +34,17 @@ #![allow(clippy::collapsible_if)] #![allow(clippy::collapsible_else_if)] -use crate::arena; -use crate::buffer::{ +use crate::core::arena; +use crate::core::buffer::{ Buffer, ContiguousBuffer, LimitBufsMut, TmpBuffer, VecRingBuffer, VECTORED_MAX, }; use crate::core::http1::Error as CoreHttpError; use crate::core::http1::{self, client, server, RecvStatus, SendStatus}; +use crate::core::net::SocketAddr; +use crate::core::reactor::Reactor; +use crate::core::shuffle::random; +use crate::core::waker::RefWakerData; +use crate::core::zmq::MultipartHeader; use crate::counter::{Counter, CounterDec}; use crate::future::{ io_split, poll_async, select_2, select_3, select_4, select_option, AsyncLocalReceiver, @@ -47,20 +52,15 @@ use crate::future::{ AsyncWrite, AsyncWriteExt, CancellationToken, ReadHalf, Select2, Select3, Select4, StdWriteWrapper, Timeout, TlsWaker, WriteHalf, }; -use crate::net::SocketAddr; use crate::pool::Pool; -use crate::reactor::Reactor; use crate::resolver; -use crate::shuffle::random; use crate::tls::{TlsStream, VerifyMode}; use crate::track::{ self, track_future, Track, TrackFlag, TrackedAsyncLocalReceiver, ValueActiveError, }; -use crate::waker::RefWakerData; use crate::websocket; use crate::zhttppacket; -use crate::zmq::MultipartHeader; -use crate::{pin, Defer}; +use crate::Defer; use arrayvec::{ArrayString, ArrayVec}; use ipnet::IpNet; use log::{debug, log, warn, Level}; @@ -73,6 +73,7 @@ use std::future::Future; use std::io::{self, Read, Write}; use std::mem; use std::net::IpAddr; +use std::pin::pin; use std::pin::Pin; use std::rc::Rc; use std::str; @@ -5873,9 +5874,9 @@ pub async fn client_stream_connection( pub mod testutil { use super::*; - use crate::buffer::TmpBuffer; - use crate::channel; - use crate::waker; + use crate::core::buffer::TmpBuffer; + use crate::core::channel; + use crate::core::waker; use std::fmt; use std::future::Future; use std::io::Read; @@ -6784,8 +6785,8 @@ pub mod testutil { mod tests { use super::testutil::*; use super::*; - use crate::buffer::TmpBuffer; - use crate::channel; + use crate::core::buffer::TmpBuffer; + use crate::core::channel; use crate::websocket::Decoder; use std::rc::Rc; use std::sync::Arc; diff --git a/src/connmgr/mod.rs b/src/connmgr/mod.rs index 9456b6c0..fd56e53c 100644 --- a/src/connmgr/mod.rs +++ b/src/connmgr/mod.rs @@ -16,10 +16,10 @@ */ use crate::client::Client; +use crate::core::zmq::SpecInfo; use crate::server::{Server, MSG_RETAINED_PER_CONNECTION_MAX, MSG_RETAINED_PER_WORKER_MAX}; use crate::websocket; use crate::zhttpsocket; -use crate::zmq::SpecInfo; use crate::ListenConfig; use ipnet::IpNet; use log::info; diff --git a/src/arena.rs b/src/core/arena.rs similarity index 100% rename from src/arena.rs rename to src/core/arena.rs diff --git a/src/buffer.rs b/src/core/buffer.rs similarity index 100% rename from src/buffer.rs rename to src/core/buffer.rs diff --git a/src/channel.rs b/src/core/channel.rs similarity index 99% rename from src/channel.rs rename to src/core/channel.rs index 5c00af38..04a0b8d8 100644 --- a/src/channel.rs +++ b/src/core/channel.rs @@ -14,9 +14,9 @@ * limitations under the License. */ -use crate::arena; -use crate::event; -use crate::list; +use crate::core::arena; +use crate::core::event; +use crate::core::list; use slab::Slab; use std::cell::RefCell; use std::collections::VecDeque; diff --git a/src/config.rs b/src/core/config.rs similarity index 100% rename from src/config.rs rename to src/core/config.rs diff --git a/src/event.rs b/src/core/event.rs similarity index 99% rename from src/event.rs rename to src/core/event.rs index c1db557e..7269e31b 100644 --- a/src/event.rs +++ b/src/core/event.rs @@ -14,8 +14,8 @@ * limitations under the License. */ -use crate::arena; -use crate::list; +use crate::core::arena; +use crate::core::list; use mio::event::Source; use mio::{Events, Interest, Poll, Token, Waker}; use slab::Slab; diff --git a/src/executor.rs b/src/core/executor.rs similarity index 99% rename from src/executor.rs rename to src/core/executor.rs index 720d445c..9839c6a0 100644 --- a/src/executor.rs +++ b/src/core/executor.rs @@ -14,8 +14,8 @@ * limitations under the License. */ -use crate::list; -use crate::waker; +use crate::core::list; +use crate::core::waker; use log::debug; use slab::Slab; use std::cell::RefCell; diff --git a/src/core/http1/client.rs b/src/core/http1/client.rs index 8068c7c0..92589c07 100644 --- a/src/core/http1/client.rs +++ b/src/core/http1/client.rs @@ -15,17 +15,17 @@ * limitations under the License. */ -use crate::buffer::{Buffer, VecRingBuffer, VECTORED_MAX}; +use crate::core::buffer::{Buffer, VecRingBuffer, VECTORED_MAX}; use crate::core::http1::error::Error; use crate::core::http1::protocol::{self, BodySize, Header, ParseScratch, ParseStatus}; use crate::core::http1::util::*; use crate::future::{ select_2, AsyncRead, AsyncWrite, AsyncWriteExt, ReadHalf, Select2, StdWriteWrapper, WriteHalf, }; -use crate::pin; use std::cell::RefCell; use std::io::{self, Write}; use std::mem; +use std::pin::pin; use std::pin::Pin; use std::str; diff --git a/src/core/http1/protocol.rs b/src/core/http1/protocol.rs index 921639bd..546c7650 100644 --- a/src/core/http1/protocol.rs +++ b/src/core/http1/protocol.rs @@ -18,7 +18,7 @@ #![allow(clippy::collapsible_if)] #![allow(clippy::collapsible_else_if)] -use crate::buffer::{write_vectored_offset, FilledBuf, LimitBufs, VECTORED_MAX}; +use crate::core::buffer::{write_vectored_offset, FilledBuf, LimitBufs, VECTORED_MAX}; use arrayvec::ArrayVec; use std::cmp; use std::convert::TryFrom; diff --git a/src/core/http1/server.rs b/src/core/http1/server.rs index fe359a61..a05cae81 100644 --- a/src/core/http1/server.rs +++ b/src/core/http1/server.rs @@ -15,16 +15,16 @@ * limitations under the License. */ -use crate::buffer::{Buffer, ContiguousBuffer, VecRingBuffer, VECTORED_MAX}; +use crate::core::buffer::{Buffer, ContiguousBuffer, VecRingBuffer, VECTORED_MAX}; use crate::core::http1::error::Error; use crate::core::http1::protocol::{self, BodySize, Header, ParseScratch, ParseStatus}; use crate::core::http1::util::*; use crate::future::{ select_2, AsyncRead, AsyncWrite, AsyncWriteExt, ReadHalf, Select2, StdWriteWrapper, WriteHalf, }; -use crate::pin; use std::cell::{Cell, RefCell}; use std::io::{self, Write}; +use std::pin::pin; use std::pin::Pin; use std::str; @@ -788,7 +788,7 @@ impl Finished { #[cfg(test)] mod tests { use super::*; - use crate::buffer::TmpBuffer; + use crate::core::buffer::TmpBuffer; use crate::future::io_split; use std::cmp; use std::future::Future; diff --git a/src/core/http1/util.rs b/src/core/http1/util.rs index b002fe08..c1c8b405 100644 --- a/src/core/http1/util.rs +++ b/src/core/http1/util.rs @@ -14,7 +14,7 @@ * limitations under the License. */ -use crate::buffer::{Buffer, VecRingBuffer}; +use crate::core::buffer::{Buffer, VecRingBuffer}; use crate::future::{AsyncRead, AsyncReadExt}; use std::cmp; use std::future::Future; diff --git a/src/list.rs b/src/core/list.rs similarity index 100% rename from src/list.rs rename to src/core/list.rs diff --git a/src/log.rs b/src/core/log.rs similarity index 100% rename from src/log.rs rename to src/core/log.rs diff --git a/src/core/mod.rs b/src/core/mod.rs index 4bddd8ea..0b8e1ba9 100644 --- a/src/core/mod.rs +++ b/src/core/mod.rs @@ -14,4 +14,19 @@ * limitations under the License. */ +pub mod arena; +pub mod buffer; +pub mod channel; +pub mod config; +pub mod event; +pub mod executor; pub mod http1; +pub mod list; +pub mod log; +pub mod net; +pub mod reactor; +pub mod shuffle; +pub mod timer; +pub mod tnetstring; +pub mod waker; +pub mod zmq; diff --git a/src/net.rs b/src/core/net.rs similarity index 100% rename from src/net.rs rename to src/core/net.rs diff --git a/src/reactor.rs b/src/core/reactor.rs similarity index 99% rename from src/reactor.rs rename to src/core/reactor.rs index 676eed9f..1a0f2309 100644 --- a/src/reactor.rs +++ b/src/core/reactor.rs @@ -14,10 +14,10 @@ * limitations under the License. */ -use crate::arena; -use crate::event; -use crate::event::ReadinessExt; -use crate::timer::TimerWheel; +use crate::core::arena; +use crate::core::event; +use crate::core::event::ReadinessExt; +use crate::core::timer::TimerWheel; use slab::Slab; use std::cell::{Cell, RefCell}; use std::cmp; @@ -1012,7 +1012,7 @@ impl TimerEvented { #[cfg(test)] mod tests { use super::*; - use crate::waker; + use crate::core::waker; use std::cell::Cell; use std::mem; use std::os::unix::io::AsRawFd; diff --git a/src/shuffle.rs b/src/core/shuffle.rs similarity index 100% rename from src/shuffle.rs rename to src/core/shuffle.rs diff --git a/src/timer.rs b/src/core/timer.rs similarity index 99% rename from src/timer.rs rename to src/core/timer.rs index 71ce5640..4359066c 100644 --- a/src/timer.rs +++ b/src/core/timer.rs @@ -16,7 +16,7 @@ // adapted from http://25thandclement.com/~william/projects/timeout.c.html (MIT licensed) -use crate::list; +use crate::core::list; use slab::Slab; use std::cmp; diff --git a/src/tnetstring.rs b/src/core/tnetstring.rs similarity index 100% rename from src/tnetstring.rs rename to src/core/tnetstring.rs diff --git a/src/waker.rs b/src/core/waker.rs similarity index 100% rename from src/waker.rs rename to src/core/waker.rs diff --git a/src/zmq.rs b/src/core/zmq.rs similarity index 100% rename from src/zmq.rs rename to src/core/zmq.rs diff --git a/src/ffi.rs b/src/ffi.rs index 5c71c239..927e5cfa 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -21,8 +21,8 @@ * $FANOUT_END_LICENSE$ */ +use crate::core::timer::TimerWheel; use crate::jwt; -use crate::timer::TimerWheel; use crate::version; use libc; use std::collections::HashSet; diff --git a/src/future.rs b/src/future.rs index 55b695d7..254e41cb 100644 --- a/src/future.rs +++ b/src/future.rs @@ -14,16 +14,18 @@ * limitations under the License. */ -use crate::arena; -use crate::channel; -use crate::event::{self, ReadinessExt}; -use crate::net::{NetListener, NetStream, SocketAddr}; -use crate::reactor::{CustomEvented, FdEvented, IoEvented, Reactor, Registration, TimerEvented}; +use crate::core::arena; +use crate::core::channel; +use crate::core::event::{self, ReadinessExt}; +use crate::core::net::{NetListener, NetStream, SocketAddr}; +use crate::core::reactor::{ + CustomEvented, FdEvented, IoEvented, Reactor, Registration, TimerEvented, +}; +use crate::core::shuffle::shuffle; +use crate::core::waker::{RefWake, RefWaker, RefWakerData}; +use crate::core::zmq::{MultipartHeader, ZmqSocket}; use crate::resolver; -use crate::shuffle::shuffle; use crate::tls::{TlsStream, TlsStreamError, VerifyMode}; -use crate::waker::{RefWake, RefWaker, RefWakerData}; -use crate::zmq::{MultipartHeader, ZmqSocket}; use mio::net::{TcpListener, TcpStream, UnixListener, UnixStream}; use openssl::ssl; use paste::paste; @@ -2804,9 +2806,9 @@ pub fn yield_to_local_events() -> YieldToLocalEvents { #[cfg(test)] mod tests { use super::*; - use crate::executor::Executor; + use crate::core::executor::Executor; + use crate::core::zmq::SpecInfo; use crate::tls::TlsAcceptor; - use crate::zmq::SpecInfo; use std::cmp; use std::fs; use std::mem; diff --git a/src/lib.rs b/src/lib.rs index a5577ab5..1b678af1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,41 +21,26 @@ * $FANOUT_END_LICENSE$ */ -pub mod arena; -pub mod buffer; -pub mod channel; pub mod client; -pub mod config; pub mod connection; pub mod connmgr; pub mod core; pub mod counter; -pub mod event; -pub mod executor; pub mod ffi; pub mod future; pub mod jwt; -pub mod list; pub mod listener; -pub mod log; -pub mod net; pub mod pool; pub mod publish_cli; -pub mod reactor; pub mod resolver; pub mod runner; pub mod server; pub mod service; -pub mod shuffle; -pub mod timer; pub mod tls; -pub mod tnetstring; pub mod track; -pub mod waker; pub mod websocket; pub mod zhttppacket; pub mod zhttpsocket; -pub mod zmq; pub use std::pin::pin; diff --git a/src/listener.rs b/src/listener.rs index 33949f00..284f6a4b 100644 --- a/src/listener.rs +++ b/src/listener.rs @@ -14,15 +14,15 @@ * limitations under the License. */ -use crate::arena::recycle_vec; -use crate::channel; -use crate::executor::Executor; +use crate::core::arena::recycle_vec; +use crate::core::channel; +use crate::core::executor::Executor; +use crate::core::net::{NetListener, NetStream, SocketAddr}; +use crate::core::reactor::Reactor; use crate::future::{ select_2, select_slice, AsyncNetListener, AsyncReceiver, AsyncSender, NetAcceptFuture, Select2, WaitWritableFuture, }; -use crate::net::{NetListener, NetStream, SocketAddr}; -use crate::reactor::Reactor; use log::{debug, error}; use std::cmp; use std::sync::mpsc; @@ -189,7 +189,7 @@ impl Drop for Listener { #[cfg(test)] mod tests { use super::*; - use crate::event; + use crate::core::event; use mio::net::TcpListener; use std::io::{Read, Write}; use std::mem; diff --git a/src/pool.rs b/src/pool.rs index c68b90c9..a50bb48c 100644 --- a/src/pool.rs +++ b/src/pool.rs @@ -14,8 +14,8 @@ * limitations under the License. */ -use crate::list; -use crate::timer::TimerWheel; +use crate::core::list; +use crate::core::timer::TimerWheel; use slab::Slab; use std::borrow::Borrow; use std::collections::HashMap; diff --git a/src/publish_cli.rs b/src/publish_cli.rs index d27b3429..82b5d607 100644 --- a/src/publish_cli.rs +++ b/src/publish_cli.rs @@ -20,7 +20,7 @@ * $FANOUT_END_LICENSE$ */ -use crate::tnetstring; +use crate::core::tnetstring; use std::collections::HashMap; use std::convert::TryInto; use std::error::Error; diff --git a/src/resolver.rs b/src/resolver.rs index 3fcf8b67..3a76125b 100644 --- a/src/resolver.rs +++ b/src/resolver.rs @@ -14,8 +14,8 @@ * limitations under the License. */ -use crate::event; -use crate::list; +use crate::core::event; +use crate::core::list; use arrayvec::{ArrayString, ArrayVec}; use mio::Interest; use slab::Slab; diff --git a/src/runner/mod.rs b/src/runner/mod.rs index 3cf3943e..72fddc33 100644 --- a/src/runner/mod.rs +++ b/src/runner/mod.rs @@ -26,7 +26,7 @@ use std::str; use std::string::String; use url::Url; -use crate::config::{get_config_file, CustomConfig}; +use crate::core::config::{get_config_file, CustomConfig}; use crate::version; #[derive(Parser, Clone)] diff --git a/src/server.rs b/src/server.rs index 6fb976fe..9118302c 100644 --- a/src/server.rs +++ b/src/server.rs @@ -15,32 +15,32 @@ * limitations under the License. */ -use crate::arena; -use crate::buffer::TmpBuffer; -use crate::channel; use crate::connection::{ server_req_connection, server_stream_connection, CidProvider, Identify, StreamSharedData, }; +use crate::core::arena; +use crate::core::buffer::TmpBuffer; +use crate::core::channel; +use crate::core::event; +use crate::core::executor::{Executor, Spawner}; +use crate::core::list; +use crate::core::net::{set_socket_opts, NetListener, NetStream, SocketAddr}; +use crate::core::reactor::Reactor; +use crate::core::tnetstring; +use crate::core::waker::RefWakerData; +use crate::core::zmq::SpecInfo; use crate::counter::Counter; -use crate::event; -use crate::executor::{Executor, Spawner}; use crate::future::{ event_wait, select_2, select_3, select_6, select_8, select_option, yield_to_local_events, AsyncLocalReceiver, AsyncLocalSender, AsyncReceiver, AsyncTcpStream, AsyncTlsStream, AsyncUnixStream, CancellationSender, CancellationToken, Select2, Select3, Select6, Select8, Timeout, TlsWaker, }; -use crate::list; use crate::listener::Listener; -use crate::net::{set_socket_opts, NetListener, NetStream, SocketAddr}; -use crate::reactor::Reactor; use crate::tls::{IdentityCache, TlsAcceptor, TlsStream}; -use crate::tnetstring; -use crate::waker::RefWakerData; use crate::zhttppacket; use crate::zhttpsocket; -use crate::zmq::SpecInfo; -use crate::{pin, set_group, set_user}; +use crate::{set_group, set_user}; use crate::{ListenConfig, ListenSpec}; use arrayvec::{ArrayString, ArrayVec}; use log::{debug, error, info, warn}; @@ -59,6 +59,7 @@ use std::net::{IpAddr, Ipv4Addr}; use std::os::unix::fs::PermissionsExt; use std::os::unix::io::{FromRawFd, IntoRawFd}; use std::path::Path; +use std::pin::pin; use std::rc::Rc; use std::str::{self, FromStr}; use std::sync::{mpsc, Arc}; diff --git a/src/track.rs b/src/track.rs index 1a7fe62a..654e04a4 100644 --- a/src/track.rs +++ b/src/track.rs @@ -172,10 +172,10 @@ where #[cfg(test)] mod tests { use super::*; - use crate::channel; - use crate::executor::Executor; + use crate::core::channel; + use crate::core::executor::Executor; + use crate::core::reactor::Reactor; use crate::future::yield_task; - use crate::reactor::Reactor; #[test] fn track_value() { diff --git a/src/websocket.rs b/src/websocket.rs index 9cb09e55..91dc9cd9 100644 --- a/src/websocket.rs +++ b/src/websocket.rs @@ -15,7 +15,7 @@ * limitations under the License. */ -use crate::buffer::{ +use crate::core::buffer::{ trim_for_display, write_vectored_offset, Buffer, LimitBufsMut, RingBuffer, VECTORED_MAX, }; use crate::core::http1::HeaderParamsIterator; @@ -1462,7 +1462,7 @@ impl + AsMut<[u8]>> Protocol { pub mod testutil { use super::*; - use crate::buffer::{TmpBuffer, VecRingBuffer}; + use crate::core::buffer::{TmpBuffer, VecRingBuffer}; use std::rc::Rc; pub struct BenchSendMessageArgs { @@ -1631,7 +1631,7 @@ pub mod testutil { mod tests { use super::testutil::*; use super::*; - use crate::buffer::{TmpBuffer, VecRingBuffer}; + use crate::core::buffer::{TmpBuffer, VecRingBuffer}; use std::collections::VecDeque; use std::rc::Rc; diff --git a/src/zhttppacket.rs b/src/zhttppacket.rs index f781ac0e..9507fee1 100644 --- a/src/zhttppacket.rs +++ b/src/zhttppacket.rs @@ -14,8 +14,8 @@ * limitations under the License. */ -use crate::arena; -use crate::tnetstring; +use crate::core::arena; +use crate::core::tnetstring; use arrayvec::ArrayVec; use std::cell::RefCell; use std::io; diff --git a/src/zhttpsocket.rs b/src/zhttpsocket.rs index b99fa41f..dd0ede8e 100644 --- a/src/zhttpsocket.rs +++ b/src/zhttpsocket.rs @@ -14,22 +14,21 @@ * limitations under the License. */ -use crate::arena; -use crate::buffer::trim_for_display; -use crate::channel; -use crate::event; -use crate::executor::Executor; +use crate::core::arena; +use crate::core::buffer::trim_for_display; +use crate::core::channel; +use crate::core::event; +use crate::core::executor::Executor; +use crate::core::list; +use crate::core::reactor::Reactor; +use crate::core::tnetstring; +use crate::core::zmq::{MultipartHeader, SpecInfo, ZmqSocket}; use crate::future::{ select_10, select_9, select_option, select_slice, AsyncReceiver, AsyncSender, AsyncZmqSocket, RecvFuture, Select10, Select9, WaitWritableFuture, ZmqSendFuture, ZmqSendToFuture, REGISTRATIONS_PER_CHANNEL, REGISTRATIONS_PER_ZMQSOCKET, }; -use crate::list; -use crate::pin; -use crate::reactor::Reactor; -use crate::tnetstring; use crate::zhttppacket::{parse_ids, Id, ParseScratch}; -use crate::zmq::{MultipartHeader, SpecInfo, ZmqSocket}; use arrayvec::{ArrayString, ArrayVec}; use log::{debug, error, log_enabled, trace, warn}; use slab::Slab; @@ -40,6 +39,7 @@ use std::fmt; use std::future::Future; use std::io; use std::marker; +use std::pin::pin; use std::pin::Pin; use std::str; use std::str::FromStr; @@ -2736,7 +2736,7 @@ impl AsyncServerStreamHandle { #[cfg(test)] mod tests { use super::*; - use crate::event; + use crate::core::event; use crate::zhttppacket::{ PacketParse, Request, RequestData, RequestPacket, Response, ResponsePacket, };