Make TakeWhileInclusive::new
private
#912
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I don't know about you but I think it's hard to know what is accessible outside the crate (except manually reading docs.rs entirely).
pub
without documentation is private thanks to#![warn(missing_docs)]
(denied in CI) butpub
with a small documentation might be public without us knowing.I therefore considered adding
#![deny(unreachable_pub)]
(description there).After doing so and (easily) fixing 60+ errors and
ripgrep "pub "
, I found out thatTakeWhileInclusive
has a public methodnew
while we usually do not publish such method.I'm actually not fully satisfied with
unreachable_pub
because somepub
remain without being accessible outside the crate.(Maybe public-api is better suited for this).
Anyway, I here made
TakeWhileInclusive::new
private.