Skip to content

Commit

Permalink
Fix: x_websocket in async-std
Browse files Browse the repository at this point in the history
  • Loading branch information
kanarus committed Dec 25, 2023
1 parent 55a5f93 commit 04324c6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 13 deletions.
12 changes: 5 additions & 7 deletions ohkami/src/layer6_testing/x_websocket.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use tokio::io::AsyncWriteExt;
use crate::__rt__::AsyncWriter;
use crate::x_websocket::{Config, Message};

use crate::x_websocket::{Message};
use crate::x_websocket::{Config};

use std::cell::UnsafeCell;
use std::pin::Pin;
use std::sync::Arc;
use std::task::Poll;
use std::io::{Error};
use std::cell::UnsafeCell;
use std::sync::Arc;
use std::sync::atomic::{AtomicBool, Ordering};
use std::task::Poll;


/// Web socket client for test with upgrade
Expand Down
9 changes: 3 additions & 6 deletions ohkami/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,11 @@
/*===== async runtime dependency layer =====*/

mod __rt__ {
#[cfg(all(feature="rt_tokio", feature="DEBUG"))]
#[allow(unused)]
#[cfg(all(feature="rt_tokio", feature="DEBUG"))]
pub(crate) use tokio::test;
#[cfg(all(feature="rt_async-std", feature="DEBUG"))]
#[allow(unused)]
#[cfg(all(feature="rt_async-std", feature="DEBUG"))]
pub(crate) use async_std::test;

#[cfg(feature="rt_tokio")]
Expand All @@ -232,13 +232,10 @@ mod __rt__ {

#[cfg(feature="rt_tokio")]
pub(crate) use tokio::sync::Mutex;
#[allow(unused)]
#[cfg(feature="rt_async-std")]
pub(crate) use async_std::sync::Mutex;

// #[cfg(all(feature="rt_tokio", feature="websocket"))]
// pub(crate) use tokio::net::tcp::{ReadHalf, WriteHalf};
// /* async-std doesn't have `split` */

#[cfg(feature="rt_tokio")]
pub(crate) use tokio::task;
#[cfg(feature="rt_async-std")]
Expand Down

0 comments on commit 04324c6

Please sign in to comment.