wasm warnings

This commit is contained in:
Christien Rioux 2023-10-28 17:46:26 -04:00
parent b590e3f28a
commit 11c19d1bad
10 changed files with 16 additions and 1 deletions

View File

@ -9,7 +9,8 @@ impl NetworkManager {
/// in this case, if it matches the node ref's filters and no more permissive connection
/// could be established.
///
/// Sending to a node requires determining a NetworkClass compatible mechanism
/// Sending to a node requires determining a NetworkClass compatible contact method
/// between the source and destination node
pub(crate) fn send_data(
&self,
destination_node_ref: NodeRef,

View File

@ -259,6 +259,7 @@ impl DialInfo {
Self::WSS(di) => di.socket_address.ip_addr(),
}
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn port(&self) -> u16 {
match self {
Self::UDP(di) => di.socket_address.port(),
@ -267,6 +268,7 @@ impl DialInfo {
Self::WSS(di) => di.socket_address.port(),
}
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn set_port(&mut self, port: u16) {
match self {
Self::UDP(di) => di.socket_address.set_port(port),
@ -275,6 +277,7 @@ impl DialInfo {
Self::WSS(di) => di.socket_address.set_port(port),
}
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn to_socket_addr(&self) -> SocketAddr {
match self {
Self::UDP(di) => di.socket_address.socket_addr(),

View File

@ -30,6 +30,7 @@ impl SocketAddress {
pub fn port(&self) -> u16 {
self.port
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn set_port(&mut self, port: u16) {
self.port = port
}

View File

@ -240,6 +240,7 @@ impl BucketEntryInner {
move |e1, e2| Self::cmp_fastest_reliable(cur_ts, e1, e2)
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn clear_signed_node_info(&mut self, routing_domain: RoutingDomain) {
// Get the correct signed_node_info for the chosen routing domain
let opt_current_sni = match routing_domain {

View File

@ -461,6 +461,7 @@ impl RoutingTable {
}
/// Set up the local network routing domain with our local routing table configuration
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn configure_local_network_routing_domain(&self, local_networks: Vec<(IpAddr, IpAddr)>) {
log_net!(debug "configure_local_network_routing_domain: {:#?}", local_networks);
self.inner
@ -501,6 +502,7 @@ impl RoutingTable {
.all_filtered_dial_info_details(routing_domain_set, filter)
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn ensure_dial_info_is_valid(&self, domain: RoutingDomain, dial_info: &DialInfo) -> bool {
self.inner
.read()
@ -755,6 +757,7 @@ impl RoutingTable {
}
/// Makes a filter that finds nodes with a matching inbound dialinfo
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn make_inbound_dial_info_entry_filter<'a>(
routing_domain: RoutingDomain,
dial_info_filter: DialInfoFilter,

View File

@ -13,6 +13,7 @@ enum RoutingDomainChange {
SetRelayNodeKeepalive {
ts: Option<Timestamp>,
},
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
AddDialInfoDetail {
dial_info_detail: DialInfoDetail,
},

View File

@ -536,6 +536,7 @@ impl Default for LocalNetworkRoutingDomainDetail {
}
impl LocalNetworkRoutingDomainDetail {
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn set_local_networks(&mut self, mut local_networks: Vec<(IpAddr, IpAddr)>) -> bool {
local_networks.sort();
if local_networks == self.local_networks {

View File

@ -111,6 +111,7 @@ impl RoutingTableInner {
self.with_routing_domain(domain, |rd| rd.common().dial_info_details().clone())
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn first_filtered_dial_info_detail(
&self,
routing_domain_set: RoutingDomainSet,
@ -323,6 +324,7 @@ impl RoutingTableInner {
}
}
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub fn configure_local_network_routing_domain(
&mut self,
local_networks: Vec<(IpAddr, IpAddr)>,

View File

@ -279,6 +279,7 @@ struct RPCProcessorUnlockedInner {
queue_size: u32,
concurrency: u32,
max_route_hop_count: usize,
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
validate_dial_info_receipt_time_ms: u32,
update_callback: UpdateCallback,
waiting_rpc_table: OperationWaiter<RPCMessage, Option<QuestionContext>>,

View File

@ -6,6 +6,7 @@ impl RPCProcessor {
feature = "verbose-tracing",
instrument(level = "trace", skip(self), ret, err)
)]
#[cfg_attr(target_arch = "wasm32", allow(dead_code))]
pub async fn rpc_call_validate_dial_info(
self,
peer: NodeRef,