Skip to content

Commit

Permalink
Merge pull request #4825 from eval-exec/exec/fix-wasm
Browse files Browse the repository at this point in the history
wasm: fix `make wasm` build failed by `error[E0521]: borrowed data escapes outside of closure`
  • Loading branch information
eval-exec authored Mar 5, 2025
2 parents 55035c8 + 86a44f9 commit 0554738
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions network/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1538,6 +1538,7 @@ pub enum TransportType {
Wss,
}

#[allow(dead_code)]
pub(crate) fn find_type(addr: &Multiaddr) -> TransportType {
let mut iter = addr.iter();

Expand Down
5 changes: 4 additions & 1 deletion network/src/peer_store/peer_store_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ impl PeerStore {
}

#[cfg(target_family = "wasm")]
pub fn dump_to_idb<P: AsRef<Path>>(&self, path: P) -> impl std::future::Future<Output = ()> {
pub fn dump_to_idb<P: AsRef<Path>>(
&self,
path: P,
) -> impl std::future::Future<Output = ()> + use<P> {
use crate::peer_store::browser::get_db;
let ban_list = self.ban_list().dump_data();
let addr_manager = self.addr_manager().dump_data();
Expand Down

0 comments on commit 0554738

Please sign in to comment.