Skip to content

Conversation

@tcharding
Copy link
Member

Three patches, the first two simple. The third is a bunch of mixed rustdoc fixes. Just sing out if this is too painful to review. I did this while attempting to understand the module better.

The comment on why we use semantic and abstract interchangeable is
better placed in the `semantic` module docs.
Currently the `translate_pk` functions on `semantic::Policy` and
`concrete::Policy` have exactly the same docs in the `# Examples`
section, down to the usage of "abstract" in both.

Direct docs readers from one function to the other to see the example.
Put some love and care into the docs in the `policy` module:

- Use standard tense on functions
- Use full sentences
- Fix grammar/spelling/typos
- Tidy up rustdoc examples
- Use standard section headers (eg, `# Returns`)
- Fix links
- Use backticks

I doubt this is perfect because fixing (and reviewing) docs is a bit
boring but I'm confident it is an improvement :)

There was a couple of functions that I could not re-write the docs for
at the time I did this work but I've misplaced them for now.
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 1bd3070

@apoelstra apoelstra merged commit 33676d1 into rust-bitcoin:master Jul 14, 2023
@tcharding tcharding deleted the 07-03-policy-cleanup branch July 25, 2023 06:48
heap-coder added a commit to heap-coder/rust-miniscript that referenced this pull request Sep 27, 2025
1bd3070b0e3fca2e87a096fb5913a2db06ee7b17 policy: Put some love into the rustdocs (Tobin C. Harding)
062d1b8ba3de2081211c1dd5c7761babcdaa0bfd Remove duplicate docs (Tobin C. Harding)
0e4fa343c4771fba1e194b9b31e45777c3c2390c Move semantic/abstract docs to the semantic module (Tobin C. Harding)

Pull request description:

  Three patches, the first two simple. The third is a bunch of mixed rustdoc fixes. Just sing out if this is too painful to review. I did this while attempting to understand the module better.

ACKs for top commit:
  apoelstra:
    ACK 1bd3070b0e3fca2e87a096fb5913a2db06ee7b17

Tree-SHA512: 907f8301ed37076dbdfe4672d0a0c2b2286513af2de54ee5b8744d8bb07b99f85bf70b3a9c6b53688af2e6ce964856c2fc2ad58f3dff649aeb2546ed97fd3e75
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