Feature lock DefaultGateway+Handle for non-wasm32

This commit is contained in:
bitfl0wer 2023-11-15 21:09:24 +01:00
parent b93b3690da
commit 10eafe46cc
1 changed files with 6 additions and 4 deletions

View File

@ -17,11 +17,13 @@
#[cfg(all(feature = "rt", feature = "rt_multi_thread"))] #[cfg(all(feature = "rt", feature = "rt_multi_thread"))]
compile_error!("feature \"rt\" and feature \"rt_multi_thread\" cannot be enabled at the same time"); compile_error!("feature \"rt\" and feature \"rt_multi_thread\" cannot be enabled at the same time");
pub type Gateway = WebsocketGateway; #[cfg(not(target_arch = "wasm32"))]
pub type GatewayHandle = WebsocketGatewayHandle; pub type Gateway = DefaultGateway;
#[cfg(not(target_arch = "wasm32"))]
pub type GatewayHandle = DefaultGatewayHandle;
use gateway::DefaultGateway as WebsocketGateway; use gateway::DefaultGateway;
use gateway::DefaultGatewayHandle as WebsocketGatewayHandle; use gateway::DefaultGatewayHandle;
use url::{ParseError, Url}; use url::{ParseError, Url};
#[cfg(feature = "client")] #[cfg(feature = "client")]