itertools
itertools copied to clipboard
Introduce Itertools::owned() / Owned.
This is very similar to std’s Iterator::clone() / Cloned, but works on more types, such as CStr / CString.
Is this essentially iterator.map(ToOwned.to_owned)?
If so:
- We are reluctant to include even more "special-case
mapinstances" (relevant discussion e.g. https://github.com/rust-itertools/itertools/pull/714#issuecomment-1963105704). I support these arguments and would prefer to not pull it intoItertools. - If someone else wants to merge, it should probably be implemented in terms of
MapSpecialCase.
Understood, I’ll wait for others to comment to decide what to do but I’m fine to close if you think it’s not a good fit.