-
Notifications
You must be signed in to change notification settings - Fork 60
Improve documentation #73
Conversation
src/lib.rs
Outdated
|
|
||
| /// Shorthand method to convert an argument into a [Box<serde_json::value::RawValue>]. | ||
| /// Since serializers rarely fail, it's probably easier to use [arg] instead. | ||
| /// Shorthand method to convert an argument into a [`Box<serde_json::value::RawValue>`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? I thought links can only point to identifiers. Taking user to Box is not very useful here, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woops, changed to "... a boxed [serde_json::value::RawValue]" (but with backticks)
| /// Since serializers rarely fail, it's probably easier to use [arg] instead. | ||
| /// Shorthand method to convert an argument into a [`Box<serde_json::value::RawValue>`]. | ||
| /// | ||
| /// Since serializers rarely fail, it's probably easier to use [`arg`] instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just arg, no? It's not a identifier so it can't be a link.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is correct, arg is a function as well. This threw me too, perhaps we should change the paramater identifier to not be arg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooooooooohhhh. :D
| //! This module implements a minimal and non standard conforming HTTP 1.0 | ||
| //! round-tripper that works with the bitcoind RPC server. This can be used | ||
| //! if minimal dependencies are a goal and synchronous communication is ok. | ||
| //! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did this so every file has the same comment layout. This is copied from rust-bitcoin where I also did it to make everything uniform - pretty anal I know. I did these docs fixes in preparation for bring this repo into the rust-bitcoin org.
|
|
||
| impl SimpleHttpTransport { | ||
| /// Construct a new `SimpleHttpTransport` with default parameters | ||
| /// Constructs a new [`SimpleHttpTransport`] with default parameters. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imperative mood is idiomatic, AFAIK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I certainly hope not, I've been changing everything to third person for the last 10 months in rust-bitcoin :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my...
... I just checked stdlib ... and indeed ...
... I've been living a lie.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check with env RUSTDOCFLAGS='-D rustdoc::broken_intra_doc_links' cargo doc --no-deps (probably good idea to have it in CI)
src/lib.rs
Outdated
| } | ||
|
|
||
| /// Shorthand method to convert an argument into a [Box<serde_json::value::RawValue>]. | ||
| /// Shorthand method to convert an argument into a [`Box<serde_json::value::RawValue>`]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cheers
|
Thanks for the review @dpc! Hope my responses weren't too terse, I'm in the last few minutes of my day. |
2bda9e4 to
c041572
Compare
|
Force push with no changes (change to commit hash only) to trigger CI. |
|
Will need #74 for the clippy CI fails, for the MacOS fails I don't know whats wrong. |
Ha! We use this already in this repo but by pure coincidence I stumbled across broken links in |
|
Needs rebase to resolve conflicts and to fix CI. |
Audit the whole codebase and improved rustdocs by doing: - Use third person tense - Use full stops - Use backticks on links - Use standard rustdoc section headings
Linking to `Box` in the rustdocs is pointless, link to the inner `serder_json` type instead.
c041572 to
ab44396
Compare
|
Cheers, rebased. No other changes. |
apoelstra
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK ab44396
Audit the whole codebase and improved rustdocs by doing: