mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-10 20:22:02 +00:00
Update to Rust 1.59 and 2021 edition (#3038)
## Proposed Changes Lots of lint updates related to `flat_map`, `unwrap_or_else` and string patterns. I did a little more creative refactoring in the op pool, but otherwise followed Clippy's suggestions. ## Additional Info We need this PR to unblock CI.
This commit is contained in:
@@ -705,13 +705,15 @@ pub fn set_network_config(
|
||||
// Appending enr-port to the dns hostname to appease `to_socket_addrs()` parsing.
|
||||
// Since enr-update is disabled with a dns address, not setting the enr-udp-port
|
||||
// will make the node undiscoverable.
|
||||
if let Some(enr_udp_port) = config.enr_udp_port.or_else(|| {
|
||||
if use_listening_port_as_enr_port_by_default {
|
||||
Some(config.discovery_port)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}) {
|
||||
if let Some(enr_udp_port) =
|
||||
config
|
||||
.enr_udp_port
|
||||
.or(if use_listening_port_as_enr_port_by_default {
|
||||
Some(config.discovery_port)
|
||||
} else {
|
||||
None
|
||||
})
|
||||
{
|
||||
addr.push_str(&format!(":{}", enr_udp_port));
|
||||
} else {
|
||||
return Err(
|
||||
|
||||
Reference in New Issue
Block a user