From 5da8ca2118dce01c9d1539009c5f2123e1a2b889 Mon Sep 17 00:00:00 2001 From: Benno Zeeman Date: Mon, 17 Jun 2024 11:29:20 +0200 Subject: [PATCH] refactor: fix nonexisting feature The `wasm32` is not a feature. It was probably supposed to be the target architecture. --- sn_peers_acquisition/src/lib.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sn_peers_acquisition/src/lib.rs b/sn_peers_acquisition/src/lib.rs index 1d358b9993..afcd3ec512 100644 --- a/sn_peers_acquisition/src/lib.rs +++ b/sn_peers_acquisition/src/lib.rs @@ -163,13 +163,15 @@ pub fn parse_peer_addr(addr: &str) -> Result { // Parse valid IPv4 socket address, e.g. `1.2.3.4:1234`. if let Ok(addr) = addr.parse::() { let start_addr = Multiaddr::from(*addr.ip()); - // Start with an address into a `/ip4//udp//quic-v1` multiaddr. + + // Turn the address into a `/ip4//udp//quic-v1` multiaddr. + #[cfg(not(feature = "websockets"))] let multiaddr = start_addr .with(Protocol::Udp(addr.port())) .with(Protocol::QuicV1); - #[cfg(all(feature = "websockets", feature = "wasm32"))] // Turn the address into a `/ip4//udp//websocket-websys-v1` multiaddr. + #[cfg(feature = "websockets")] let multiaddr = start_addr .with(Protocol::Tcp(addr.port())) .with(Protocol::Ws("/".into()));