- Notifications
You must be signed in to change notification settings - Fork5.5k
Add clarifications about the Enumerator.size#15615
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jeremyevans left a comment
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 think it's worth adding these clarifications, but I would reword and not beat the reader over the head with comments on the results ofsize.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
c5e3eea to414391eComparezverok commentedDec 18, 2025
Thanks a lot@jeremyevans, I always struggle to maintain a balance and not over-explain stuff. Your versions are definitely much better! |
jeremyevans left a comment
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.
Looks good. I recommend a couple more changes, but this can be merged without further review.
| * Note that enumerator size might be imprecise, and should be rather treated as a hint. | ||
| * There is no check that the size provided to ::new is accurate: |
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.
| *Notethatenumeratorsizemightbeimprecise,andshouldberathertreatedasahint. | |
| *Thereisnocheckthatthesizeprovidedto ::newisaccurate: | |
| *Notethatenumeratorsizemightbeinaccurate,andshouldberathertreatedasahint. | |
| *Forexample,thereisnocheckthatthesizeprovidedto ::newisaccurate: |
As discussed inBug #21780, added clarifications about the imprecision of
Enumerator.size, and one small example of usingsize: nilinEnumerator.produce.