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

Give take_while_inclusive a more intuitive doc alias #972

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

Ciel-MC
Copy link
Contributor

@Ciel-MC Ciel-MC commented Jul 15, 2024

I could not for the life of me find this function lmao, it's called take until most places so I think an alias for searchability would be nice

Copy link

codecov bot commented Jul 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.24%. Comparing base (6814180) to head (65e49a1).
Report is 112 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #972      +/-   ##
==========================================
- Coverage   94.38%   94.24%   -0.15%     
==========================================
  Files          48       49       +1     
  Lines        6665     6709      +44     
==========================================
+ Hits         6291     6323      +32     
- Misses        374      386      +12     

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

Copy link
Member

@Philippe-Cholet Philippe-Cholet left a comment

Choose a reason for hiding this comment

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

It seems reasonable to me.

However, there is Iterator::take_while so it does not come from nowhere. 😀

@phimuemue Any objection?

@Philippe-Cholet
Copy link
Member

@Ciel-MC Maybe #[doc(alias = "TakeUntil")] on TakeWhileInclusive?

@jswrenn
Copy link
Member

jswrenn commented Jul 15, 2024

Seems reasonable to me!

@Ciel-MC
Copy link
Contributor Author

Ciel-MC commented Jul 15, 2024

However, there is Iterator::take_while so it does not come from nowhere. 😀

I do understand that it didn't come from nowhere, but it is a bit like calling 2 "1+1", like yes it came from adding 1 to 1, but it has a pretty common name already.

@Ciel-MC Maybe #[doc(alias = "TakeUntil")] on TakeWhileInclusive?

I mean, I guess that is just as searchable? Though I'm not sure why you'd want it on the struct instead of the method(excuse my inexperience with api design)

@Philippe-Cholet Philippe-Cholet added this pull request to the merge queue Jul 15, 2024
@Philippe-Cholet
Copy link
Member

Philippe-Cholet commented Jul 15, 2024

It was a question. After searching doc aliases on rust-lang/rust, it sure does not alias structs much if at all, my bad.

Thanks

Merged via the queue into rust-itertools:master with commit a4a82e4 Jul 15, 2024
14 checks passed
@Philippe-Cholet Philippe-Cholet added this to the next milestone Jul 15, 2024
@Ciel-MC Ciel-MC deleted the patch-1 branch July 15, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants