mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
e1d49aaad4
Add `FromIterator` and `IntoIterator` impls for `ThinVec` These should make using `ThinVec` feel much more like using `Vec`. They will allow users of `Vec` to switch to `ThinVec` while continuing to use `collect()`, `for` loops, and other parts of the iterator API. I don't know if there were use cases before for using the iterator API with `ThinVec`, but I would like to start using `ThinVec` in rustdoc, and having it conform to the iterator API would make the transition *a lot* easier. I added a `FromIterator` impl, an `IntoIterator` impl that yields owned elements, and `IntoIterator` impls that yield immutable or mutable references to elements. I also added some unit tests for `ThinVec`. |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |