From ffc9921ef2adce563938b503884366ee3512c781 Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Sun, 20 Oct 2024 17:43:12 +0200 Subject: [PATCH] small refactor with `then_some` (#1533) small refactor with then_some --- crates/node-bindings/src/nodes/reth.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/node-bindings/src/nodes/reth.rs b/crates/node-bindings/src/nodes/reth.rs index a7a90edc7a4..53d393df0de 100644 --- a/crates/node-bindings/src/nodes/reth.rs +++ b/crates/node-bindings/src/nodes/reth.rs @@ -517,7 +517,7 @@ impl Reth { instance: self.instance, http_port, ws_port, - p2p_port: if p2p_port != 0 { Some(p2p_port) } else { None }, + p2p_port: (p2p_port != 0).then_some(p2p_port), ipc: self.ipc_path, data_dir: self.data_dir, auth_port: Some(auth_port),