Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upadded documentation for public parts of the crate #27
Conversation
This comment has been minimized.
This comment has been minimized.
|
@KodrAus, any suggestions on this PR? |
This comment has been minimized.
This comment has been minimized.
KodrAus
commented
Nov 2, 2017
|
Sorry I somehow missed this. Thanks for the ping @serejkus and for taking on these docs! I'll dig in to this later today. |
KodrAus
reviewed
Nov 3, 2017
| //! collection of [`range::Predicate`] | ||
| //! representing data for version comparision. | ||
| //! | ||
| //! # Example |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| @@ -1,3 +1,52 @@ | |||
| //! Collection of structures and helper functions for parsing semantic version. | |||
| //! | |||
| //! This crate contains data structures for holding version data and comparision of versions | |||
This comment has been minimized.
This comment has been minimized.
KodrAus
Nov 3, 2017
Typo here: comparision to comparison. I always type comparision for some reason...
Looks like there are a few other places we should replace comparision with comparison.
| //! use semver_parser::version; | ||
| //! | ||
| //! # fn try_main() -> Result<(), String> { | ||
| //! |
This comment has been minimized.
This comment has been minimized.
KodrAus
Nov 3, 2017
We should remove these newlines after hidden lines, it makes the code here look a little funny, but when it renders in the docs you only have 1 visible newline.
Does that make sense?
| //! | ||
| //! # Example | ||
| //! | ||
| //! ```rust |
This comment has been minimized.
This comment has been minimized.
KodrAus
Nov 3, 2017
For the docs we don't actually need the rust annotation here. rustdoc assumes the code block contains testable Rust by default.
| @@ -1,30 +1,222 @@ | |||
| //! Version range and requirements data and functions (used for version comparision) | |||
This comment has been minimized.
This comment has been minimized.
KodrAus
Nov 3, 2017
Let's throw a . at the end of these introduction lines in all the modules, structures and methods to be consistent.
| #[derive(Clone, Debug, PartialEq, Eq)] | ||
| pub struct Version { | ||
| /// major version as number (`0` in `"0.1.2"`); |
This comment has been minimized.
This comment has been minimized.
KodrAus
Nov 3, 2017
Let's capitalise the major, minor etc on these docs and use a . instead of a ; at the end.
This comment has been minimized.
This comment has been minimized.
|
Thanks for pointing out! Will try to fix those issues in a day. |
This comment has been minimized.
This comment has been minimized.
|
Seconded, thanks a ton @serejkus :) |
This comment has been minimized.
This comment has been minimized.
|
Fixed issues with style and added links to cargo docs explaining caret and tilde version requirements. Two commits are ok or is it better to rebase it into a single commit? |
This comment has been minimized.
This comment has been minimized.
|
Two commits is just fine. Thanks again! |
serejkus commentedOct 31, 2017
Added docs for public parts of the crate, as requested in #17 and #23.
English is not my native language, so feel free to fix grammar issues. The same applies to examples: most of them are just copy-paste and involve parsing of semver structs from strings, maybe there might be a better approach in some cases.