diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-10-14 14:14:18 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-10-14 14:14:18 +0100 |
commit | e182825170e346abb84240b84458b49b73783dca (patch) | |
tree | 899e18326f89571f835a0d9eb2f42a71f714f2df /crates/ra_hir/src/lib.rs | |
parent | 1f4fbc0035a6a9ee1b599a3aa9f236989633a9f7 (diff) | |
parent | 3a55b5bf01ddc581a3f00fa56db725db93a131c6 (diff) |
Merge #2006
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 <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/lib.rs')
-rw-r--r-- | crates/ra_hir/src/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs index 9cbd9a8ae..ca261e8f5 100644 --- a/crates/ra_hir/src/lib.rs +++ b/crates/ra_hir/src/lib.rs | |||
@@ -51,6 +51,7 @@ mod lang_item; | |||
51 | mod generics; | 51 | mod generics; |
52 | mod resolve; | 52 | mod resolve; |
53 | pub mod diagnostics; | 53 | pub mod diagnostics; |
54 | mod util; | ||
54 | 55 | ||
55 | mod code_model; | 56 | mod code_model; |
56 | 57 | ||