diff options
Diffstat (limited to '')
-rw-r--r-- | lampada/src/error.rs | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lampada/src/error.rs b/lampada/src/error.rs index 8104155..40be012 100644 --- a/lampada/src/error.rs +++ b/lampada/src/error.rs @@ -1,11 +1,14 @@ use std::sync::Arc; +#[cfg(not(target_arch = "wasm32"))] +use ::tokio::time::error::Elapsed; use stanza::client::Stanza; use thiserror::Error; -use tokio::{ - sync::{mpsc::error::SendError, oneshot::error::RecvError}, - time::error::Elapsed, -}; +use tokio::sync::{mpsc::error::SendError, oneshot::error::RecvError}; +#[cfg(target_arch = "wasm32")] +use tokio::time::Elapsed; +#[cfg(target_arch = "wasm32")] +use tokio_with_wasm::alias as tokio; #[derive(Debug, Error, Clone)] pub enum ConnectionError { |