mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Use then instead of then_some when checking upnp_enabled to avoid useless UPnP query (#6170)
* Use `then` instead of `then_some` when checking `upnp_enabled` to avoid useless UPnP query
This commit is contained in:
@@ -385,7 +385,7 @@ impl<E: EthSpec> Network<E> {
|
||||
let upnp = Toggle::from(
|
||||
config
|
||||
.upnp_enabled
|
||||
.then_some(libp2p::upnp::tokio::Behaviour::default()),
|
||||
.then(libp2p::upnp::tokio::Behaviour::default),
|
||||
);
|
||||
let behaviour = {
|
||||
Behaviour {
|
||||
|
||||
Reference in New Issue
Block a user