diff --git a/.drone.yml b/.drone.yml index 7e87e4f..d8482f4 100644 --- a/.drone.yml +++ b/.drone.yml @@ -32,7 +32,7 @@ steps: commands: - sleep 75 - ./scripts/deploy_sandbox_client.sh server:4000 - - cargo test --no-default_features --features "client,tls_no_verify" + - cargo test --no-default-features --features "client,tls_no_verify" services: - name: database diff --git a/src/bin/sandbox/sandbox.rs b/src/bin/sandbox/sandbox.rs index f5a8225..c308231 100644 --- a/src/bin/sandbox/sandbox.rs +++ b/src/bin/sandbox/sandbox.rs @@ -1,9 +1,9 @@ extern crate log; -#[cfg(feature = "server")] -use libtrader::server; #[cfg(feature = "client")] use libtrader::client; +#[cfg(feature = "server")] +use libtrader::server; fn main() { #[cfg(feature = "server")] @@ -18,13 +18,12 @@ fn main() { // Spawn server rt.block_on(async move { - server::IP.scope("0.0.0.0:0000".parse().unwrap(), async move { - // for main task logging - server::initialize() - .await - .expect("failed running server"); - }) - .await; + server::IP + .scope("0.0.0.0:0000".parse().unwrap(), async move { + // for main task logging + server::initialize().await.expect("failed running server"); + }) + .await; }); } diff --git a/src/libtrader/common/message.rs b/src/libtrader/common/message.rs index 326d651..3316c27 100644 --- a/src/libtrader/common/message.rs +++ b/src/libtrader/common/message.rs @@ -7,10 +7,10 @@ use tokio::io::AsyncReadExt; use tokio::io::AsyncWriteExt; use tokio::net::TcpStream; -#[cfg(all(feature = "server", not(feature = "client")))] -use tokio_rustls::server::TlsStream; #[cfg(all(feature = "client", not(feature = "server")))] use tokio_rustls::client::TlsStream; +#[cfg(all(feature = "server", not(feature = "client")))] +use tokio_rustls::server::TlsStream; #[derive(Serialize, Deserialize, PartialEq, Debug, Default)] pub struct Message {