-
Notifications
You must be signed in to change notification settings - Fork 541
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
Documentation tweaks #1274
Documentation tweaks #1274
Conversation
b53ea5e
to
e5f98a1
Compare
Codecov Report
@@ Coverage Diff @@
## 0.4.x #1274 +/- ##
=======================================
Coverage 91.50% 91.50%
=======================================
Files 38 38
Lines 17313 17314 +1
=======================================
+ Hits 15843 15844 +1
Misses 1470 1470
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
d38da02
to
3ea9c0f
Compare
This took a little more effort. If you don't document a type right at the crate root, it must be in another public module or otherwise it will not be documented:
And because types such as |
4f07c82
to
b4bfa59
Compare
@@ -533,7 +533,7 @@ pub use offset::LocalResult; | |||
#[doc(inline)] | |||
pub use offset::{FixedOffset, Offset, TimeZone, Utc}; | |||
|
|||
mod round; | |||
pub mod round; |
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 don't understand the argument put forth in the commit message. What's the rationale for this change?
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.
The idea is to highlight the importants traits in the "Traits" section: TimeZone
, Offset
, Datelike
and Timelike
.
I don't think DurationRound
and SubsecRound
are good enough to be part of the list in the main documentation.
We can only hide it in the list if the round
module is public.
To say it stronger, in my opinion the DurationRound
trait is something that begs for a replacement.
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.
Okay, sure, but if that's the goal IMO the other changes to that goal should be in the same commit as that. In general, the first commit here seems too large/unfocused (it probably doesn't help that I'm completely unfamiliar with the semantics of doc(no_inline)
)...
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.
O, sorry. That was only the goal of that commit. No: the goal of the PR was tweaking doc(inline)
and doc(no_inline)
.
If the original module is public:
- a re-export comes under the list "Re-exports".
doc(inline)
on a re-export copies the documentation, so it now lives at two places.
If the original module is private:
- a re-export moves the documentation.
doc(no_inline)
makes the documentation unreachable.
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.
In general, the first commit here seems too large/unfocused
I have split it up into three commits.
src/lib.rs
Outdated
|
||
mod round; | ||
pub mod round; | ||
#[doc(no_inline)] |
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.
Oops, that means this line does nothing 😄.
d96eb11
to
9210e0a
Compare
(so we don't need to show it in the main documentation)
9210e0a
to
77bb121
Compare
This is one of those things that have been sitting as a half-finished branch for a couple of months...
I would like to tweak the
inline
/no-inline
attributes of re-exports inlib.rs
so that the the useful types are better visible than the ones that are rarely needed return types.Before
After