Re-export all types inside the network module#518
Closed
stevenroose wants to merge 1 commit intorust-bitcoin:masterfrom
Closed
Re-export all types inside the network module#518stevenroose wants to merge 1 commit intorust-bitcoin:masterfrom
stevenroose wants to merge 1 commit intorust-bitcoin:masterfrom
Conversation
apoelstra
reviewed
Nov 23, 2020
src/network/mod.rs
Outdated
Member
There was a problem hiding this comment.
Can you make an explicit list?
It will be long but using * makes the codebase ungreppable.
Collaborator
Author
There was a problem hiding this comment.
I'm concerned about types being forgotten when explicit listing. How do you(/we) feel about making the submodules private so that all types have to be exported (otherwise cargo will shout unused).
17c6366 to
3b8efcc
Compare
Collaborator
Author
|
Ok so I redid this PR, now the internal modules are made private so this is a breaking change. I think the API is a lot more usable like this. |
Also make the inner modules private so that all network-related types come in a single namespace in the API. This gives more ease-of-use and gives us more flexibility to organize the types as we like.
Collaborator
Author
|
I suppose #525 supersedes this one. |
Member
|
Closing in favor of #525 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It's really quite confusing which network messages are in which submodules etc. I've been doing some work on rust-bitcoin-p2p over the weekend and this re-export would really simplify things a lot!