Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm: fix make wasm build failed by error[E0521]: borrowed data escapes outside of closure #4825

Merged
merged 2 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading