Clean up module level rustdocs#689
Conversation
Docs can always do with a bit of love. Clean up the module level (`//!`) rustdocs for all public modules. I claim uniform is better than any specific method/style. I tried to fit in with what ever was either most sane of most prevalent, therefore attaining uniformity without unnecessary code churn (one exception being the changes to headings described below). Notes: * Headings - use heading as a regular sentence for all modules e.g., ``` //! Bitcoin network messages. ``` as opposed to ``` //! # Bitcoin Network Messages ``` It was not clear which style to use so I picked a 'random' mature project and copied their style. * Added 'This module' in _most_ places as the start of the module description, however I was not religious about this one. * Fixed line length if necessary since most of our code seems to follow short (80 char) line lengths for comments anyways. * Added periods and fixed obvious (and sometimes not so obvious) grammatically errors. * Added a trailing `//!` to every block since this was almost universal already. I don't really like this one but I'm guessing it is Andrew's preferred style since its on the copyright notices as well.
There was a problem hiding this comment.
Thank you for the attention to details!
ACK 3f5caa5
BTW I always thought that we have 100-line comments here
| // | ||
|
|
||
| //! Pay-to-contract-hash support | ||
| //! Pay-to-contract-hash support. |
There was a problem hiding this comment.
This module is kind of deprecated, so maybe it is worth mentioning it in the docs
There was a problem hiding this comment.
Added a comment to the rustdocs of contracthash module. Done as a separate patch.
sanket1729
left a comment
There was a problem hiding this comment.
ACK 3f5caa5. Thank you so much for doing this
Thanks for letting me know, EDIT: Point noted, I looked over this PR, I think I'll leave it as is because in this instance the shorter line length only adds a few lines of code and changing to 100 made these few blocks of docs, in my opinion, stand out even more. With |
Module `contracthash` is deprecated, add this info to the module rustdoc.
dbb3edd
Docs can always do with a bit of love.
Clean up the module level (
//!) rustdocs for all public modules.I claim uniform is better than any specific method/style. I tried to fit
in with what ever was either most sane of most prevalent, therefore
attaining uniformity without unnecessary code churn (one exception being
the changes to headings described below).
Notes:
as opposed to
It was not clear which style to use so I picked a 'random' mature
project and copied their style.
Added 'This module' in most places as the start of the module
description, however I was not religious about this one.
Fixed line length if necessary since most of our code seems to follow
short (80 char) line lengths for comments anyways.
Added periods and fixed obvious (and sometimes not so obvious)
grammatically errors.
Added a trailing
//!to every block since this was almost universalalready. I don't really like this one but I'm guessing it is Andrew's
preferred style since its on the copyright notices as well.