Fix test imports being os-specific without conditional compilation

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/18/head
trivernis 3 years ago
parent 37e66ad0ab
commit bccbb7e087
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -7,7 +7,7 @@ use std::path::PathBuf;
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc; use std::sync::Arc;
use std::time::{Duration, SystemTime}; use std::time::{Duration, SystemTime};
use tokio::net::{TcpListener, UnixListener}; use tokio::net::TcpListener;
use typemap_rev::TypeMapKey; use typemap_rev::TypeMapKey;
async fn handle_ping_event<P: AsyncProtocolStream>(ctx: &Context<P>, e: Event) -> IPCResult<()> { async fn handle_ping_event<P: AsyncProtocolStream>(ctx: &Context<P>, e: Event) -> IPCResult<()> {
@ -41,7 +41,7 @@ async fn it_receives_unix_socket_events() {
if socket_path.exists() { if socket_path.exists() {
std::fs::remove_file(&socket_path).unwrap(); std::fs::remove_file(&socket_path).unwrap();
} }
it_receives_events::<UnixListener>(socket_path).await; it_receives_events::<tokio::net::UnixListener>(socket_path).await;
} }
async fn it_receives_events<L: 'static + AsyncStreamProtocolListener>(address: L::AddressType) { async fn it_receives_events<L: 'static + AsyncStreamProtocolListener>(address: L::AddressType) {

Loading…
Cancel
Save