-
Notifications
You must be signed in to change notification settings - Fork 542
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
Improve docs for crate features #1455
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1455 /- ##
=======================================
Coverage 92.11% 92.11%
=======================================
Files 40 40
Lines 18026 18026
=======================================
Hits 16604 16604
Misses 1422 1422 ☔ View full report in Codecov by Sentry. |
41f8df0
to
88eaa06
Compare
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.
Thank you @edmorley for straightening this out. One nit and one suggestion.
src/lib.rs
Outdated
//! - `rkyv-32`: Enable serialization/deserialization via [rkyv], using 32-bit integers for integral `*size` types. | ||
//! - `rkyv-64`: Enable serialization/deserialization via [rkyv], using 64-bit integers for integral `*size` types. | ||
//! - `rkyv-validation`: Enable rkyv validation support using `bytecheck`. | ||
//! - `rustc-serialize`: Enable serialization/deserialization via rustc-serialize (deprecated). | ||
//! - `arbitrary`: construct arbitrary instances of a type with the Arbitrary crate. |
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.
Now that everything starts with a capital, update this line also?
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.
Good spot - I had skim read to look for more capitalisation issues, but my eyes clearly failed me 😆
src/lib.rs
Outdated
//! - [`serde`][]: Enable serialization/deserialization via serde. | ||
//! - `rkyv`: Enable serialization/deserialization via rkyv. | ||
//! - `serde`: Enable serialization/deserialization via [serde]. | ||
//! - `rkyv`: Enable serialization/deserialization via [rkyv]. This is equivalent to `rkyv-32`. |
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.
We should probably discourage the use of this feature in the documentation, we only have it for compatibility. The replacement features where introduced in #1368.
No preference from my side on how to word it. Maybe just "rkyv
: Deprecated, use the kkyv-*
features"?
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.
Sounds good to me!
88eaa06
to
1ca1df1
Compare
I've force pushed rather than adding a "Fix review comments" commit since it looks like this repo doesn't normally use squash merges. To make the re-review easier, the diff between this version and the last can be seen here: |
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.
Thank you!
And thanks for looking at how we like the commits 😄.
@djc will probably also want to have a look.
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.
Thanks for cleaning this up!
Consistency is good, but on balance I would probably prefer to avoid capitalizing after :
.
The `chrono` crate makes use of several Cargo features: https://github.com/chronotope/chrono/blob/02c68d69a1ff8e6461384a770b87737b5096eae3/Cargo.toml#L19-L46 These features are documented in both `README.md` and the rustdocs in `lib.rs, however, the lists in each place were missing some features and also inconsistent in their descriptions. I've also removed the unused `[wasm-bindgen]` link definition. Fixes chronotope#1434.
1ca1df1
to
ed6fb25
Compare
So I tried switching to using lowercase after the colons, however, that didn't work so well for the items in the list that have multiple sentences after the colon, since then the first sentence is not capitalised, but later ones are. Searching around, it seems that it's acceptable to capitalise after a colon when using a complete sentence: As such, I've added a couple of missing trailing periods, making all entries be complete sentences, so that they are suitable for capitalisation. |
I've force pushed with the latest changes; diff here: |
Thank you @edmorley. |
The
chrono
crate makes use of several Cargo features:chrono/Cargo.toml
Lines 19 to 46 in 02c68d6
These features are documented in both
README.md
and the rustdocs in `lib.rs, however, the lists in each place were missing some features and also inconsistent in their descriptions.I've also removed the unused
[wasm-bindgen]
link definition.Fixes #1434.