Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upstream::repeat_item #326
Conversation
This comment has been minimized.
This comment has been minimized.
|
I suspect that 99% of usage of this function would be to repeat something akin to |
This comment has been minimized.
This comment has been minimized.
|
Hmm... before posting an RFC issue, do you think a |
stepancheg
force-pushed the
stepancheg:stream-repeat
branch
2 times, most recently
from
6e8c5be
to
e1371d7
Jan 3, 2017
This comment has been minimized.
This comment has been minimized.
|
Renamed |
alexcrichton
reviewed
Jan 3, 2017
|
|
||
| /// Stream that produces the same element repeatedly. | ||
| #[must_use = "streams do nothing unless polled"] | ||
| pub struct RepeatStream<T, E> |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Jan 3, 2017
Member
Could this be called Repeat instead? I see that IterStream doesn't follow this convention but I think that may be a mistake.
stepancheg
force-pushed the
stepancheg:stream-repeat
branch
from
e1371d7
to
fb4ef0d
Jan 3, 2017
This comment has been minimized.
This comment has been minimized.
|
Renamed |
This comment has been minimized.
This comment has been minimized.
|
@Stebalien perhaps, but let's not discuss that here. @stepancheg thanks! |
stepancheg commentedJan 2, 2017
Procuces the same cloned element forever.
stream::repeatname would mimiciter::repeat, however,stream::repeatwithResultparam is not possible usually, becausemost error types (e. g.
io::Error) are notClone. Hence thename
repeat_item.