Iterator::intersperse
doesn't seem to work correctly when collecting into a String
#81145
Labels
A-iterators
Area: Iterators
C-bug
Category: This is a bug.
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
I tried this code (playground):
I expected to see this happen:
", "
is placed between each digit:Instead, this happened:
intersperse
does not insert", "
between"1"
and"2"
:Note that this works as expected when collecting into a
Vec
(playground):Meta
rustc --version --verbose
:@rustbot modify labels: +A-iterators +T-libs
The text was updated successfully, but these errors were encountered: