Removing internal iterators from str & vec, part 2 by huonw · Pull Request #7015 · rust-lang/rust (original) (raw)
bors added a commit that referenced this pull request
Continuation of #7015, and #6995.
Rewrites the character-based each_split
functions in str
to use an iterator, removes a few redundant methods, and replaces all uses of len
, is_empty
and slice
functions with the methods (and deletes the the functions).
Update: Ok, this has turned into a major makeover for str
, turning a lot of functions into methods, and removing redundant ones. Each commit is essentially a single such change.
(Unscientific benchmarks suggest that the external split_iter
is approximately 10% faster than the internal one. I'm not quite sure why this would be true.)
(@thestinger is probably interested in this.)