Skip to content

Commit

Permalink
sdk: fix WASM build
Browse files Browse the repository at this point in the history
  • Loading branch information
yukibtc committed Oct 9, 2023
1 parent 7239ed4 commit 0a87049
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/nostr-sdk/src/relay/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ mod stats;
pub use self::options::{FilterOptions, RelayOptions, RelayPoolOptions, RelaySendOptions};
use self::options::{MAX_ADJ_RETRY_SEC, MIN_RETRY_SEC};
pub use self::pool::{RelayPoolMessage, RelayPoolNotification};
pub use self::stats::{PingStats, RelayConnectionStats};
pub use self::stats::RelayConnectionStats;
#[cfg(feature = "blocking")]
use crate::RUNTIME;

Expand Down
10 changes: 6 additions & 4 deletions crates/nostr-sdk/src/relay/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@
#[cfg(not(target_arch = "wasm32"))]
use std::collections::VecDeque;
use std::sync::atomic::{AtomicBool, AtomicU64, AtomicUsize, Ordering};
#[cfg(not(target_arch = "wasm32"))]
use std::sync::atomic::AtomicBool;
use std::sync::atomic::{AtomicU64, AtomicUsize, Ordering};
use std::sync::Arc;
use std::time::Duration;
#[cfg(not(target_arch = "wasm32"))]
use std::time::Instant;
use std::time::{Duration, Instant};

use nostr::Timestamp;
#[cfg(not(target_arch = "wasm32"))]
use tokio::sync::RwLock;

#[cfg(feature = "blocking")]
Expand All @@ -20,7 +22,7 @@ use crate::RUNTIME;
/// Ping Stats
#[cfg(not(target_arch = "wasm32"))]
#[derive(Debug, Clone)]
pub struct PingStats {
pub(crate) struct PingStats {
sent_at: Arc<RwLock<Instant>>,
last_nonce: Arc<AtomicU64>,
replied: Arc<AtomicBool>,
Expand Down

0 comments on commit 0a87049

Please sign in to comment.