Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.7→0.14Release Notes
rust-itertools/itertools (itertools)
v0.14.0Compare Source
Breaking
cons_tuples(#988)Added
array_combinations(#991)k_smallest_relaxedand variants (#925)next_arrayandcollect_array(#560)DoubleEndedIteratorforFilterOk(#948)DoubleEndedIteratorforFilterMapOk(#950)Changed
Q: ?SizedinItertools::contains(#971)chain!(#943)into_group_map_bydocumentation (#1000)tree_reducedocumentation (#955)merge_join_by(#966)take_while_inclusive(#972)find_or_lastandfind_or_first(#984)tuple_combinations(#945)track_callerattr forasser_equal(#976)Notable Internal Changes
default_featuresinCargo.tomltodefault-features(#985)v0.13.0Compare Source
Breaking
DoubleEndedIteratorforConsTuples(#853)MultiProductfused and fixed on an empty iterator (#835, #834)iproduct!to return tuples for maxi one iterator too (#870)PutBack::put_backto return the old value (#880)repeat_call, Itertools::{foreach, step, map_results, fold_results}(#878)TakeWhileInclusive::new(#912)Added
Itertools::{smallest_by, smallest_by_key, largest, largest_by, largest_by_key}(#654, #885)Itertools::tail(#899)DoubleEndedIteratorforProcessResults(#910)DebugforFormatWith(#931)Itertools::get(#891)Changed
Itertools::group_by(renamedchunk_by) (#866, #879)unfold(usestd::iter::from_fninstead) (#871)GroupingMapBy(#873, #876)Fnbounds toFnMutindiff_with, Itertools::into_group_map_by(#886)Debug/Clonebounds forMapInto(#889)use_allocfeature (#887)Itertools::set_from(#888)README.md(#890)Cargo.toml(#894)Itertools::k_smalleston short unfused iterators (#900)Itertools::tree_fold1(renamedtree_reduce) (#895)GroupingMap::fold_first(renamedreduce) (#902)Itertools::k_smallest(0)to consume the iterator, optimizedItertools::k_smallest(1)(#909)Combinations::nth(#914)MergeBy::fold(#920)CombinationsWithReplacement::nth(#923)FlattenOk::{fold, rfold}(#927)Powerset::nth(#924)assert_equalfor iterators longer thani32::MAX(#932)must_usemessage of non-lazyKMergeByandTupleCombinations(#939)Notable Internal Changes
CONTRIBUTING.md(#767)v0.12.1Compare Source
Added
Itertools::[tuple_]combinations(#822)iterate(#842)CloneandDebugforDiff(#845)DebugforWithPosition(#859)EqforMinMaxResult(#838)From<EitherOrBoth<A, B>>forOption<Either<A, B>>(#843)PeekingNextforRepeatN(#855)Changed
CoalesceBylazy (#801)Filter[Map]Ok::next,Itertools::partition,Unique[By]::next[_back](#818)Itertools::find_position(#837)Positions::next[_back](#816)ZipLongest::fold(#854)Debugbounds forGroupingMapBy(#860)ExactlyOneError::fold(#826)Interleave[Shortest]::fold(#849)MultiPeek::fold(#820)PadUsing::[r]fold(#825)PeekNth::fold(#824)Positions::[r]fold(#813)PutBackN::fold(#823)RepeatN::[r]fold(#821)TakeWhileInclusive::fold(#851)ZipLongest::rfold(#848)Notable Internal Changes
clippyin CI (#740)rustdocin CI (#840)v0.12.0Compare Source
Breaking
take_while_inclusiveconsume iterator by value (#709)Clonebound toUnique(#777)Added
Itertools::try_len(#723)sort_unstable(#796)GroupMap::fold_with(#778, #785)PeekNth::{peek_mut, peek_nth_mut}(#716)PeekNth::{next_if, next_if_eq}(#734)(Option<A>,Option<B>)toEitherOrBoth(#713)Either<A, B>toEitherOrBoth<A, B>(#715)ExactSizeIteratorforTuples(#761)ExactSizeIteratorfor(Circular)TupleWindows(#752)EitherOrBoth<T>a shorthand forEitherOrBoth<T, T>(#719)Changed
#[must_use]annotations on iterator adaptors (#794)Combinationslazy (#795)Intersperse(With)lazy (#797)Permutationslazy (#793)Productlazy (#800)TupleWindowslazy (#602)Combinations::{count, size_hint}(#729)CombinationsWithReplacement::{count, size_hint}(#737)Powerset::fold(#765)Powerset::count(#735)TupleCombinations::{count, size_hint}(#763)TupleCombinations::fold(#775)WhileSome::fold(#780)WithPosition::fold(#772)ZipLongest::fold(#774){min, max}_set*operations requireallocfeature, instead ofstd(#760)tree_fold1(#787)permutations(#724)multiunzip(#770)Notable Internal Changes
Permutations(#739, #748, #790)Merge/MergeBy/MergeJoinByimplementations (#736)Permutations::size_hint(#739)rustfmtin CI (#751)cargo hackto check MSRV (#754)v0.11.0Compare Source
Breaking
Itertools::merge_join_byalso accept functions returning bool (#704)PeekingNexttransitively over mutable references (#643)with_positionto yield(Position, Item)instead ofPosition<Item>(#699)Added
Itertools::take_while_inclusive(#616)PeekingNextforPeekingTakeWhile(#644)EitherOrBoth::{just_left, just_right, into_left, into_right, as_deref, as_deref_mut, left_or_insert, right_or_insert, left_or_insert_with, right_or_insert_with, insert_left, insert_right, insert_both}(#629)CloneforCircularTupleWindows(#686)CloneforChunks(#683)Itertools::process_results(#680)Changed
Cellinstead ofRefCellinFormatandFormatWith(#608)Itertools::max_set_by_key(#692)Cargo.toml(#672)equalwithIterator::eq(#591)v0.10.5Compare Source
v0.10.4Compare Source
EitherOrBoth::orandEitherOrBoth::or_else(#593)min_set,max_setet al. (#613, #323)either/use_std(#628)v0.10.3Compare Source
v0.10.1Compare Source
Itertools::contains(#514)Itertools::counts_by(#515)Itertools::partition_result(#511)Itertools::all_unique(#241)Itertools::duplicatesandItertools::duplicates_by(#502)chain!(#525)Itertools::at_most_one(#523)Itertools::flatten_ok(#527)EitherOrBoth::or_default(#583)Itertools::find_or_lastandItertools::find_or_first(#535)FusedIteratorforFilterOk,FilterMapOk,InterleaveShortest,KMergeBy,MergeBy,PadUsing,Positions,Product,RcIter,TupleWindows,Unique,UniqueBy,Update,WhileSome,Combinations,CombinationsWithReplacement,Powerset,RepeatN, andWithPosition(#550)FusedIteratorforInterleave,IntersperseWith, andZipLongest(#548)v0.10.0Compare Source
Itertools::powerset(#335)Itertools::sorted_unstable,Itertools::sorted_unstable_by, andItertools::sorted_unstable_by_key(#494)ErrorforExactlyOneError(#484)Itertools::fold_while(#476)use_allocfeature for users who havealloc, but notstd(#474)Itertools::k_smallest(#473)Itertools::into_grouping_mapandGroupingMap(#465)Itertools::into_grouping_map_byandGroupingMapBy(#465)Itertools::counts(#468)DoubleEndedIteratorforUnique(#442)DoubleEndedIteratorforUniqueBy(#442)DoubleEndedIteratorforZip(#346)Itertools::multipeek(#435)Itertools::dedup_with_countandDedupWithCount(#423)Itertools::dedup_by_with_countandDedupByWithCount(#423)Itertools::intersperse_withandIntersperseWith(#381)Itertools::filter_okandFilterOk(#377)Itertools::filter_map_okandFilterMapOk(#377)Itertools::fold_results, useItertools::fold_okinstead (#377)Itertools::map_results, useItertools::map_okinstead (#377)FoldResults, useFoldOkinstead (#377)MapResults, useMapOkinstead (#377)Itertools::circular_tuple_windowsandCircularTupleWindows(#350)peek_nthandPeekNth(#303)v0.9.0Compare Source
MergeJoinBy::size_hint(#385)derive(Clone)where possible (#382)try_collectmethod (#394)HomogeneousTupletrait (#389)combinations(0)andcombinations_with_replacement(0)(#383)ParitalEqto theItemofDedupBy(#397)PutBackadaptor and on theMergeJoinByiterator (#372)position_*methods (#412)HashforEitherOrBoth(#417)v0.8.2Compare Source
slice::iterinstead ofinto_iterto avoid future breakage (#378, by @LukasKalbertodt)v0.8.1Compare Source
.exactly_one()iterator method that, on success, extracts the single value of an iterator ; by @XaeroxeAdded combinatory iterator adaptors:
.permutations(k):[0, 1, 2].iter().permutations(2)yields; by @tobz1000
.combinations_with_replacement(k):[0, 1, 2].iter().combinations_with_replacement(2)yields; by @tommilligan
For reference, these methods join the already existing
.combinations(k):[0, 1, 2].iter().combinations(2)yieldsImproved the performance of
.fold()-based internal iteration for the.intersperse()iterator ; by @jswrennAdded
.dedup_by(),.merge_by()and.kmerge_by()adaptors that work like.dedup(),.merge()and.kmerge(), but taking an additional custom comparison closure parameter. ; by @phimuemueImproved the performance of
.all_equal(); by @fyrchikLoosened the bounds on
.partition_map()to take just aFnMutclosure rather than aFnclosure, and made its implementation use internal iteration for better performance ; by @danielhenrymantillaAdded convenience methods to
EitherOrBothelements yielded from the.zip_longest()iterator adaptor ; by @Avi-D-coderAdded
.sum1()and.product1()iterator methods that respectively try to return the sum and the product of the elements of an iterator when it is not empty, otherwise they returnNone; by @Emerentiusv0.8.0Compare Source
.map_into()for conversions usingIntoby @vornerItertoolsdocs by @JohnHeitmann.sorted_by_by_key()is now an iterator, not a Vec.izip!(x, y)macro with exactly two arguments is now the usualIterator::zip..flatten()in favour of std's.flatten().foreach()in favour of std's.for_each().step()in favour of std's.step_by()repeat_callin favour of std'srepeat_with.fold_while()in favour of std's.try_fold()Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.