joinery
A small crate for generically joining iterators with a separator
3.1.0
14M downloads/mo
#2602 most downloaded on crates.io
Lucretiel/joinery
What this package is like to depend on
Last release 4 years ago
no release in 18 months
Ships unpredictably
gaps range from 2 weeks to 2.3 years
Most releases are documented
notes for 11 of 16 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
16 releases · first in 2018
0 releases in the last 12 months
see the full history below
Release timeline
16 releases · Jul 2018 to Sep 2022Releases
latest 16-
3.1.014 Sep 2022Release notes
Open source →Internal
- Added optimized implementations of
Iterator::lastandIterator::count
- Added optimized implementations of
-
3.0.017 Aug 2022Release notes
Open source →Removed some methods to allow for a more efficient implementation of
JoinIter. If you weren't usingpeekorpeek_itemyou should be able to upgrade without issue.Changed
- More efficient implementation of
JoinIter. No more reduntant states allows for a manualtry_foldimplementation, at the cost of thepeekfamily of methods - Now using Edition 2021
- No longer need to use the
private::Display<'a>hack
Removed
- Removed
peekandpeek_item - Removed
syndependency
- More efficient implementation of
-
2.1.024 May 2021Release notes
Open source →Added
- Added
token-streamfeature which, when enabled, provides aToTokensimplementation toJoin. This allowsJoinobjects to be used as lazy token streams inquote. - 0-size
Displaytype forNewlineinseparators.
- Added
-
2.0.010 Feb 2019Release notes
Open source →2019-02-10
Major redesign of library. Most idiomatic joinery code should continue to work, but most of the library's traits and structs have been completely redesigned. The most significant change is that joinery is no longer primarily based on cloneable iterators, but rather on referentially iterable collections; that is, types for which
&'a Container: IntoIterator. This means that we can get rid of a lot of the weird cruft related topartial_clone, etc.Design notes:
- Iterators and collections are now treated separately. The
Joinstruct is now based on collections, which are types which implement referential iteration (that is, for which&T: IntoIterator). - Iterators can be adapted into
Joininstances via theCloneIteratoradapter, which adds&T: IntoIteratorto types that areT: Clone + Iterator. - While the types have drastically changed, idiomatic code (which imports the prelude and uses mainly the
join_withmethod) should continue to function correctly.
Changed
- Split the library into various modules for the different functionality.
joincontains theJointype and related traits.itercontains theJoinItertype and related traits and structs.separatorscontains various convenient 0-sizeDisplaytypes for common separators, likeCommaandSpace.
Added
JoinableIteratortrait, which allows joining iterators directly viaiter_join_with, or adapting them intoJoinstructs viajoin_with- Added numerous extra 0-size separator types, like
CommaandSpace, for common separators. - Advanced to Rust 2018 Edition.
Removed
NoSeparatorremoved from the prelude, since it's generally preferable to usejoin_concat- Many methods on
Joinwere deemed too niche and removed as part of the redesign, such aspartial_cloneandconsume_fmt.
- Iterators and collections are now treated separately. The
-
1.2.216 Sep 2018Release notes
Open source →2018-09-15
Minor
- Various optimizations and simplifications
- Extra test
- Added cargo categories
-
1.2.111 Sep 2018 -
1.2.011 Sep 2018 -
1.1.223 Aug 2018 -
1.1.123 Aug 2018 -
1.1.023 Aug 2018Release notes
Open source →2018-08-23
Added
- Empty separators:
- Added
NoSeparator, a zero-size type which allows users to idiomatically join an iterator without any separator. - Added
join_concat, a helper method for separator-free joins.
- Added
Removed
- Removed
try_foldafter discovering serious implementation bug.- Added test demonstrating this bug
- Would like to re-add someday, but seems difficult or impossible.
- Note that Iterator still provides
try_fold; the only thing being removed is the specialized implementation.
Minor
- Small documentation fix (#12)
- Added README badges
- Empty separators:
-
1.0.010 Aug 2018 -
0.2.310 Aug 2018Nothing published for this version
-
0.2.210 Aug 2018Nothing published for this version
-
0.2.130 Jul 2018Nothing published for this version
-
0.2.030 Jul 2018Nothing published for this version
-
0.1.029 Jul 2018Nothing published for this version