Skip to content

Commit a2ab26c

Browse files
authored
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
1 parent a3f44c6 commit a2ab26c

File tree

1 file changed

+1
-1
lines changed
  • beacon_node/lighthouse_network/src/service

1 file changed

+1
-1
lines changed

beacon_node/lighthouse_network/src/service/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ impl<E: EthSpec> Network<E> {
385385
let upnp = Toggle::from(
386386
config
387387
.upnp_enabled
388-
.then_some(libp2p::upnp::tokio::Behaviour::default()),
388+
.then(libp2p::upnp::tokio::Behaviour::default),
389389
);
390390
let behaviour = {
391391
Behaviour {

0 commit comments

Comments
 (0)