Skip to content

Conversation

tcharding
Copy link
Member

Do a bunch of trivial clean ups to the imports and exports in lib.rs. Done as tiny patches to make review trivial. The only meaningful change, apart from leaving the code awesomely clean, is the Scalar type moving sections in rendered HTML docs.

When re-exporting crates it is slightly more explicit to use `pub
extern` intstead of `pub use`.

Classifies as an internal change only - I think.
Group private and public modules separately.

Internal change only.
Just to be extra clear and because we are about to mess with the crate
re-exports.

Internal change only.
To be explicit and make the code brain dead easy to read.

Internal change only.
Move the use statements above the `pub use` statements as we do in
`rust-bitcoin`.

Internal change only.
@apoelstra
Copy link
Member

In c32a52b:

This commit is empty. (I'm surprised jj is letting you push these.)

@apoelstra
Copy link
Member

Other than that a2f4d95 lgtm

Group and add `doc(inline)` attribute. From local testing the only
thing that changes is that `Scalar` is put in the structs section
instead of the Re-exports section. I found that adding the attribute
to the other public re-exports had no effect.
@tcharding
Copy link
Member Author

ooo that patch got made empty by the formatter (and yes I did not look at the diff after running just fmt, I rebased this PR so many times yesterday my fingers bled).

I'm surprised jj is letting you push these.

Its a good UNIX tool and lets me shoot myself if and when I desire.

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

ACK 4e44e6f; successfully ran local tests

@apoelstra apoelstra merged commit 2e5f65b into rust-bitcoin:master Sep 13, 2025
28 checks passed
chain-forgexcr45 added a commit to chain-forgexcr45/rust-secp256k1 that referenced this pull request Sep 28, 2025
… exports

4e44e6f19aeee18d74c24bdd5c87662c402ec95c Inline the re-exports (Tobin C. Harding)
8a73ead8b508fb383fce824314d9c90326739797 Put public re-exports separately (Tobin C. Harding)
bea8f94982d7bca850c9b63a09f9cf70af1bfef9 Re-export context from crate::context (Tobin C. Harding)
8b3f0973f30c255394669aea7fc85cc74529896b Put the secp256k1-sys re-export separately (Tobin C. Harding)
302c3628e6a647f1b23c2496b846aadf13993975 Group private modules (Tobin C. Harding)
6007659541af1e063d11ca576f2e8f1495517763 Use pub extern crate instead of pub use (Tobin C. Harding)

Pull request description:

  Do a bunch of trivial clean ups to the imports and exports in `lib.rs`. Done as tiny patches to make review trivial. The only meaningful change, apart from leaving the code awesomely clean, is the `Scalar` type moving sections in rendered HTML docs.


ACKs for top commit:
  apoelstra:
    ACK 4e44e6f19aeee18d74c24bdd5c87662c402ec95c; successfully ran local tests


Tree-SHA512: fb3796211bb71a30c86eb16109526c8866137b46d1cd2e60857859dd0934b5015d1ea227f57e7b8d7f95403ac2dec98442ae96b144bbd21762dc2ad74a650efd
william2332-limf added a commit to william2332-limf/rust-secp256k1 that referenced this pull request Oct 2, 2025
… exports

4e44e6f19aeee18d74c24bdd5c87662c402ec95c Inline the re-exports (Tobin C. Harding)
8a73ead8b508fb383fce824314d9c90326739797 Put public re-exports separately (Tobin C. Harding)
bea8f94982d7bca850c9b63a09f9cf70af1bfef9 Re-export context from crate::context (Tobin C. Harding)
8b3f0973f30c255394669aea7fc85cc74529896b Put the secp256k1-sys re-export separately (Tobin C. Harding)
302c3628e6a647f1b23c2496b846aadf13993975 Group private modules (Tobin C. Harding)
6007659541af1e063d11ca576f2e8f1495517763 Use pub extern crate instead of pub use (Tobin C. Harding)

Pull request description:

  Do a bunch of trivial clean ups to the imports and exports in `lib.rs`. Done as tiny patches to make review trivial. The only meaningful change, apart from leaving the code awesomely clean, is the `Scalar` type moving sections in rendered HTML docs.


ACKs for top commit:
  apoelstra:
    ACK 4e44e6f19aeee18d74c24bdd5c87662c402ec95c; successfully ran local tests


Tree-SHA512: fb3796211bb71a30c86eb16109526c8866137b46d1cd2e60857859dd0934b5015d1ea227f57e7b8d7f95403ac2dec98442ae96b144bbd21762dc2ad74a650efd
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.

2 participants