Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize trait derives in network message and graph objects #803

Merged
merged 4 commits into from
Feb 22, 2021

Conversation

TheBlueMatt
Copy link
Collaborator

In general, trivial structs that have no inner logic can/should
all derive, at least, Clone, Debug, PartialEq.

@sr-gi
Copy link
Contributor

sr-gi commented Feb 22, 2021

ACK a05b51a. It may also be worth adding Clone to NetworkGraph.

@TheBlueMatt TheBlueMatt force-pushed the 2021-02-derives branch 2 times, most recently from d1627c3 to 1171a0b Compare February 22, 2021 16:18
@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Merging #803 (c229735) into main (94bb0c9) will increase coverage by 0.04%.
The diff coverage is 70.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #803      +/-   ##
==========================================
+ Coverage   90.80%   90.84%   +0.04%     
==========================================
  Files          45       45              
  Lines       24547    24547              
==========================================
+ Hits        22289    22300      +11     
+ Misses       2258     2247      -11     
Impacted Files Coverage Δ
lightning/src/ln/msgs.rs 88.62% <66.66%> (ø)
lightning/src/routing/network_graph.rs 91.00% <100.00%> (ø)
lightning/src/ln/functional_tests.rs 97.18% <0.00%> (+0.18%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 94bb0c9...c229735. Read the comment docs.

In general, trivial structs that have no inner logic can/should
all derive, at least, `Clone, Debug, PartialEq`.
In general, trivial structs that have no inner logic can/should
all derive, at least, `Clone, Debug, PartialEq`.
@TheBlueMatt
Copy link
Collaborator Author

Rebased and updated the auto-generated bindings with new clones.

Copy link
Contributor

@valentinewallace valentinewallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Comment on lines -71 to 72
#[cfg(not(feature = "fuzztarget"))]
pub(crate) features: InitFeatures,
#[cfg(feature = "fuzztarget")]
/// The relevant features which the sender supports
pub features: InitFeatures,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take it this was necessary for the bindings?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm honestly not sure why it was here, I think it's just left over from when we had all the message guts hidden instead of exposed. Features is a well-exposed type now, though.

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review ACK c229735

@TheBlueMatt TheBlueMatt merged commit d6f41d3 into lightningdevkit:main Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants