mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-12-25 23:39:22 -05:00
clippy fixes and cleanup
This commit is contained in:
parent
ab276de977
commit
4a4271db61
@ -166,13 +166,9 @@ impl ConnectionManager {
|
||||
let netman = self.network_manager();
|
||||
let routing_table = netman.routing_table();
|
||||
let remote_address = conn.flow().remote_address().address();
|
||||
let Some(routing_domain) = routing_table.routing_domain_for_address(remote_address) else {
|
||||
return None;
|
||||
};
|
||||
let Some(rn) = routing_table.relay_node(routing_domain) else {
|
||||
return None;
|
||||
};
|
||||
let relay_nr = rn.filtered_clone(
|
||||
let routing_domain = routing_table.routing_domain_for_address(remote_address)?;
|
||||
let relay_node = routing_table.relay_node(routing_domain)?;
|
||||
let relay_nr = relay_node.filtered_clone(
|
||||
NodeRefFilter::new()
|
||||
.with_routing_domain(routing_domain)
|
||||
.with_address_type(conn.flow().address_type())
|
||||
|
@ -340,17 +340,14 @@ impl DiscoveryContext {
|
||||
tries += 1;
|
||||
|
||||
// Attempt a port mapping. If this doesn't succeed, it's not going to
|
||||
let Some(mapped_external_address) = igd_manager
|
||||
let mapped_external_address = igd_manager
|
||||
.map_any_port(
|
||||
low_level_protocol_type,
|
||||
address_type,
|
||||
local_port,
|
||||
Some(external_1.address.ip_addr()),
|
||||
)
|
||||
.await
|
||||
else {
|
||||
return None;
|
||||
};
|
||||
.await?;
|
||||
|
||||
// Make dial info from the port mapping
|
||||
let external_mapped_dial_info = self.unlocked_inner.net.make_dial_info(
|
||||
|
@ -239,10 +239,7 @@ fn get_destination(
|
||||
|
||||
let private_route = if let Some(prid) = get_route_id(rss.clone(), false, true)(text)
|
||||
{
|
||||
let Some(private_route) = rss.best_remote_private_route(&prid) else {
|
||||
return None;
|
||||
};
|
||||
private_route
|
||||
rss.best_remote_private_route(&prid)?
|
||||
} else {
|
||||
let mut dc = DEBUG_CACHE.lock();
|
||||
let n = get_number(text)?;
|
||||
|
Loading…
Reference in New Issue
Block a user