File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -967,7 +967,7 @@ impl_writeable_tlv_based!(RouteHintHop, {
967
967
} ) ;
968
968
969
969
#[ derive( Eq , PartialEq ) ]
970
- #[ repr( C ) ] // Force our field ordering to keep the size 64 bytes
970
+ #[ repr( align ( 64 ) ) ] // Force the size to 64 bytes
971
971
struct RouteGraphNode {
972
972
node_id : NodeId ,
973
973
score : u64 ,
@@ -994,7 +994,7 @@ impl cmp::PartialOrd for RouteGraphNode {
994
994
}
995
995
}
996
996
997
- // While RouteGraphNode can be laid out as 56 bytes, performance appears to be improved
997
+ // While RouteGraphNode can be laid out with fewer bytes, performance appears to be improved
998
998
// substantially when it is laid out at exactly 64 bytes.
999
999
//
1000
1000
// Thus, we use `#[repr(C)]` on the struct to force a suboptimal layout and check that it stays 64
You can’t perform that action at this time.
0 commit comments