Skip to content

Commit a05b51a

Browse files
committed
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`.
1 parent 5dd20e7 commit a05b51a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/routing/network_graph.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ where
335335
}
336336
}
337337

338-
#[derive(Clone, PartialEq, Debug)]
338+
#[derive(Clone, Debug, PartialEq)]
339339
/// Details about one direction of a channel. Received
340340
/// within a channel update.
341341
pub struct DirectionalChannelInfo {
@@ -376,7 +376,7 @@ impl_writeable!(DirectionalChannelInfo, 0, {
376376
last_update_message
377377
});
378378

379-
#[derive(PartialEq)]
379+
#[derive(Clone, Debug, PartialEq)]
380380
/// Details about a channel (both directions).
381381
/// Received within a channel announcement.
382382
pub struct ChannelInfo {
@@ -447,7 +447,7 @@ impl Writeable for RoutingFees {
447447
}
448448
}
449449

450-
#[derive(Clone, PartialEq, Debug)]
450+
#[derive(Clone, Debug, PartialEq)]
451451
/// Information received in the latest node_announcement from this node.
452452
pub struct NodeAnnouncementInfo {
453453
/// Protocol features the node announced support for
@@ -513,7 +513,7 @@ impl Readable for NodeAnnouncementInfo {
513513
}
514514
}
515515

516-
#[derive(Clone, PartialEq)]
516+
#[derive(Clone, Debug, PartialEq)]
517517
/// Details about a node in the network, known from the network announcement.
518518
pub struct NodeInfo {
519519
/// All valid channels a node has announced

0 commit comments

Comments
 (0)