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

Do some docs fixes #134

Merged
merged 6 commits into from
Jan 13, 2024
Merged

Do some docs fixes #134

merged 6 commits into from
Jan 13, 2024

Conversation

tcharding
Copy link
Member

Do a bunch of rustdocs fixes.

src/primitives/encode.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
Copy link
Member

@clarkmoody clarkmoody left a comment

Choose a reason for hiding this comment

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

Changes looking good so far. Will review after conflicts are fixed.

@tcharding
Copy link
Member Author

Rebased, no other changes.

@tcharding
Copy link
Member Author

Found some other links that were not working as intended, pushed on top as a separate patch.

src/hrp.rs Outdated
@@ -1,6 +1,9 @@
// SPDX-License-Identifier: MIT

//! Re-exports the hrp types from [`primitives::hrp`] to make importing ergonomic for the top level APIs.
//! Re-exports the HRP types from the [`primitives::hrp`] to make importing ergonomic for the
Copy link
Member

Choose a reason for hiding this comment

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

In f3bfb62

If you are going to add the you should add module or something after the module name.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I just dropped this whole change and stuck with what the patch claimed to be doing - fix the links.

@@ -7,7 +7,7 @@
//! prepending HRP strings etc.
//!
//! In general, directly using these adaptors is not very ergonomic, and users are recommended to
//! instead use the higher-level functions at the root of this crate.
//! instead use the higher crate level API.
Copy link
Member

Choose a reason for hiding this comment

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

In aec24d3:

I think higher-level crate API scans better. You could use higher crate-level API if you want to indicate that the API is "crate level", but I think you need a hyphen or else this is hard to read.

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I see, you fix this later in 738a7f4.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, sorry about that. There were two different instances so I did them together in a separate patch. Bit confusing, my bad.

@apoelstra
Copy link
Member

ec5eb94 looks good aside from a couple nits.

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 651142f

@apoelstra
Copy link
Member

will let @clarkmoody review before merging

@tcharding
Copy link
Member Author

Put on ice while #155 and #141 go in.

@tcharding
Copy link
Member Author

#155 and #141 seem to be stalled, lets just push these docs fixes in.

@tcharding tcharding marked this pull request as ready for review December 11, 2023 05:15
@tcharding
Copy link
Member Author

Rebased, no other changes.

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 f256f62

Currently we have docs for public modules in two places and these are
joined together when rendered as HTML.

Remove the rustdoc strings from `lib.rs` and defer to the modules for
the module level docs.
Fix the links by doing:

- Use correct number, 350 not 359.
- Make rustdoc render the links correctly, currently they are being
  rendered as the URL because it requires whitespace between body of
  rustdoc and link target.
Fix cut'n'pasta error, this is the `hrp` struct not an hrpstring.
This line is a bit stale, since it was written we have added multiple
crate level APIs. Use the same wording as in the `decode` module docs.
The wording is a bit iffy, fix it up.
Bips don't need code ticks (by convention). Also the ticks do not match
up with the link so in HTML they are not links.
@tcharding
Copy link
Member Author

Rebased, no other changes.

Copy link
Member

@clarkmoody clarkmoody left a comment

Choose a reason for hiding this comment

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

ACK ea97465

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 ea97465

@apoelstra apoelstra merged commit 8ffd138 into rust-bitcoin:master Jan 13, 2024
12 checks passed
@tcharding tcharding deleted the 10-04-docs branch January 14, 2024 20:40
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.

3 participants