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
Minmax set (prev "Add {min,max}_set(_by{_key)?)? functions") #613
Commits on May 4, 2022
-
FEAT: Add {min,max}_set(_by{_key)?)? functions
The function min_set returns a Vec of all the minimum values. All variants for max and with key extraction and comparison functions are added also. Since the functions need to return an unknown number of values and the values are not known until the iterator is finished, the function needs to allocate memory. Therefore Vec is used for returning the values.
Configuration menu - View commit details
-
Copy full SHA for e8c67ef - Browse repository at this point
Copy the full SHA e8c67efView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb8b41a - Browse repository at this point
Copy the full SHA bb8b41aView commit details -
Add {min,max}_set(_by{_key)?)? functions (3) use Ord instead of Parti…
…alOrd We may relax this bound at some point, but I'd go with this until we have evidence that it bothers users, as there have been cases where I actually was happy to be informed about Ord vs PartialOrd.
Configuration menu - View commit details
-
Copy full SHA for 491b34a - Browse repository at this point
Copy the full SHA 491b34aView commit details -
Add {min,max}_set(_by{_key)?)? functions (4) use internal iteration
We may relax this bound at some point, but I'd go with this until we have evidence that it bothers users, as there have been cases where I actually was happy to be informed about Ord vs PartialOrd.
Configuration menu - View commit details
-
Copy full SHA for 834bcc5 - Browse repository at this point
Copy the full SHA 834bcc5View commit details -
Add {min,max}_set(_by{_key)?)? functions (5) comparator uses Ordering…
… instead of bool More canonical.
Configuration menu - View commit details
-
Copy full SHA for 6f96e01 - Browse repository at this point
Copy the full SHA 6f96e01View commit details -
Add {min,max}_set(_by{_key)?)? functions (6) inline bulk into match arm
Slightly simplifies control flow as it avoids mutable variables that may not even be used in case of early return.
Configuration menu - View commit details
-
Copy full SHA for fb57fc6 - Browse repository at this point
Copy the full SHA fb57fc6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08a10da - Browse repository at this point
Copy the full SHA 08a10daView commit details
Commits on May 21, 2022
-
Add {min,max}_set(_by{_key)?)? functions (8) add quickcheck tests
the {min,max}_set results must contain the result of the corresponding {min,max} variant.
Configuration menu - View commit details
-
Copy full SHA for 846219f - Browse repository at this point
Copy the full SHA 846219fView commit details