mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-23 23:01:33 +00:00
*: Enable libp2p to run via wasm32-unknown-unknown in the browser (#2320)
Changes needed to get libp2p to run via `wasm32-unknown-unknown` in the browser (both main thread and inside web workers). Replaces wasm-timer with futures-timer and instant. Co-authored-by: Oliver Wangler <oliver@wngr.de>
This commit is contained in:
@ -21,12 +21,13 @@
|
||||
//! This implements a time-based LRU cache for checking gossipsub message duplicates.
|
||||
|
||||
use fnv::FnvHashMap;
|
||||
use instant::Instant;
|
||||
use std::collections::hash_map::{
|
||||
self,
|
||||
Entry::{Occupied, Vacant},
|
||||
};
|
||||
use std::collections::VecDeque;
|
||||
use std::time::{Duration, Instant};
|
||||
use std::time::Duration;
|
||||
|
||||
struct ExpiringElement<Element> {
|
||||
/// The element that expires
|
||||
|
Reference in New Issue
Block a user