Revive std.range.slide from the dead#5943
Conversation
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
09f622e to
31e33d3
Compare
JackStouffer
left a comment
There was a problem hiding this comment.
One thing I would like to see before this gets merged is to cut down on the number of tests, as this is most likely the most tested range function by far. There are tons of places here where many different cases are tested where one or two would have sufficed.
Removed the number of tests by 300 lines (and addressed your other points). |
|
Looks good. I'll wait a week to allow other commentary and merge if there's no comments. |
385cb89 to
1a94c19
Compare
This is a revival of
std.range.slide... finally!History
std.range.slidewas introduced in #4027 and I delayed its release in #5614 as at the time of the merge I didn't have to work on it.Why was it needed to rework this function before its release?
tl;dr: the implementation of
withFewerElementswas broken forYes.withFewerElements.(see #5614 for details).
Changes
It's hard make an exact summary of the changes,
Yes.withPartialwithFewerElementstowithPartial(shorted & clearer name)withPartialexplicitlyI apologize for this diff being so big, but most changes are the extended test coverage.