forked from Marwes/combine
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make StreamOnce for &'a [T] require Clone rather than Copy.
Clone is a super-type of Copy, so everything that implements Copy already implements Clone. Therefore, this is strictly more general. In addition, .clone() on things that implement Copy should be inlined (to `return *self`) and essentially zero cost. And per Marwes#74 (comment), .clone() already be fast in order for parsing to be fast, so the performance assumptions in the non-Copy case should be similar.
- Loading branch information
Showing
1 changed file
with
17 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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