From 8051fb0118c2b23c3d38927ea58d5780996c9863 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Mon, 22 Feb 2021 11:05:54 -0500 Subject: [PATCH] Standardize trait derives in network graph objects In general, trivial structs that have no inner logic can/should all derive, at least, `Clone, Debug, PartialEq`. --- lightning/src/routing/network_graph.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lightning/src/routing/network_graph.rs b/lightning/src/routing/network_graph.rs index 4c5e718fe..ab3249335 100644 --- a/lightning/src/routing/network_graph.rs +++ b/lightning/src/routing/network_graph.rs @@ -335,7 +335,7 @@ where } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq)] /// Details about one direction of a channel. Received /// within a channel update. pub struct DirectionalChannelInfo { @@ -376,7 +376,7 @@ impl_writeable!(DirectionalChannelInfo, 0, { last_update_message }); -#[derive(PartialEq)] +#[derive(Clone, Debug, PartialEq)] /// Details about a channel (both directions). /// Received within a channel announcement. pub struct ChannelInfo { @@ -447,7 +447,7 @@ impl Writeable for RoutingFees { } } -#[derive(Clone, PartialEq, Debug)] +#[derive(Clone, Debug, PartialEq)] /// Information received in the latest node_announcement from this node. pub struct NodeAnnouncementInfo { /// Protocol features the node announced support for @@ -513,7 +513,7 @@ impl Readable for NodeAnnouncementInfo { } } -#[derive(Clone, PartialEq)] +#[derive(Clone, Debug, PartialEq)] /// Details about a node in the network, known from the network announcement. pub struct NodeInfo { /// All valid channels a node has announced -- 2.39.5