Skip to content
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

Make TakeWhileInclusive::new private #912

Conversation

Philippe-Cholet
Copy link
Member

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) but pub 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 that TakeWhileInclusive has a public method new while we usually do not publish such method.

I'm actually not fully satisfied with unreachable_pub because some pub remain without being accessible outside the crate.
(Maybe public-api is better suited for this).

Anyway, I here made TakeWhileInclusive::new private.

Copy link

codecov bot commented Apr 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.38%. Comparing base (6814180) to head (81bac92).
Report is 45 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #912      +/-   ##
==========================================
- Coverage   94.38%   94.38%   -0.01%     
==========================================
  Files          48       48              
  Lines        6665     6837     +172     
==========================================
+ Hits         6291     6453     +162     
- Misses        374      384      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@phimuemue phimuemue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, good catch.

@Philippe-Cholet Philippe-Cholet added this pull request to the merge queue Apr 10, 2024
Merged via the queue into rust-itertools:master with commit 37c54d1 Apr 10, 2024
13 checks passed
@Philippe-Cholet Philippe-Cholet deleted the new-take_while_inclusive branch April 10, 2024 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants