mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
e182825170
2006: Improvements around `Arc<[T]>` r=matklad a=sinkuu First commit tries to avoid cloning `Arc<[T]>` to a temporary `Vec` for mutating it, if there are no other strong references. Second commit utilizes [`FromIterator for Arc<[T]>`](https://doc.rust-lang.org/std/sync/struct.Arc.html#impl-FromIterator%3CT%3E) instead of `.collect::<Vec<_>>().into()` to avoid allocation in `From<Vec<T>> for Arc<[T]>`. Co-authored-by: Shotaro Yamada <sinkuu@sinkuu.xyz> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |