mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 01:05:47 +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(
|
let upnp = Toggle::from(
|
||||||
config
|
config
|
||||||
.upnp_enabled
|
.upnp_enabled
|
||||||
.then_some(libp2p::upnp::tokio::Behaviour::default()),
|
.then(libp2p::upnp::tokio::Behaviour::default),
|
||||||
);
|
);
|
||||||
let behaviour = {
|
let behaviour = {
|
||||||
Behaviour {
|
Behaviour {
|
||||||
|
|||||||
Reference in New Issue
Block a user