Skip to content

Commit

Permalink
small refactor with then_some
Browse files Browse the repository at this point in the history
  • Loading branch information
tcoratger committed Oct 19, 2024
1 parent 8729a58 commit a1fdf87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/node-bindings/src/nodes/reth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit a1fdf87

Please sign in to comment.