map_or Documentation should note that the arguments are eagerly evaluated #68866
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Apologies if this isn't the appropriate repo to raise this issue on, I can close and re-create it wherever would be more appropriate.
It's a small thing, but in the documentation for both std::result::Result and std::option::Option it's noted that the *_or arguments are eagerly evaluated (with a suggestion to use the *_or_else for lazy evaluation) everywhere except for map_or. The behavior isn't super obvious up front if you're unfamiliar with that fact, but is very much important to know, so it would be nice if they were all consistent in that.
This issue has been assigned to @tom-a-wagner via this comment.
The text was updated successfully, but these errors were encountered: