From: Matt Corallo Date: Mon, 22 Feb 2021 16:05:54 +0000 (-0500) Subject: Standardize trait derives in network graph objects X-Git-Tag: v0.0.13~22^2~2 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=8051fb0118c2b23c3d38927ea58d5780996c9863;p=rust-lightning 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`. --- 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