forked from rust-bitcoin/rust-bech32
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate public and private use statements
Improve the public exports in two ways: 1. Inline re-exports into the docs of the module that re-exports them. 2. Separate public and private use statements Recently we discussed a way to separate the public and private import statements to make the code more clear and prevent `rustfmt` joining them all together. Separate public exports using a code block and `#[rustfmt::skip]`. Has the nice advantage of reducing the number of `#[doc(inline)]` attributes also. 1. Modules first, as they are part of the project's structure. 2. Private imports 3. Public re-exports (using `rustfmt::skip` to prevent merge) Use the format ```rust mod xyz; mod abc; use ...; pub use { ..., }; ``` This patch introduces changes to the rendered HTML docs.
- Loading branch information
Showing
2 changed files
with
23 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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