diff options
| author | Josh Stone <jistone@redhat.com> | 2024-08-13 12:29:46 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2024-08-13 13:40:05 -0700 |
| commit | 0a34ce49ceab68a75dd34f1e76555396a8b5b2c8 (patch) | |
| tree | ac3cbd7b5c0b360ced610511485c9a141cb96e54 /compiler/rustc_index/src | |
| parent | 80eb5a8e910e5185d47cdefe3732d839c78a5e7e (diff) | |
| download | rust-0a34ce49ceab68a75dd34f1e76555396a8b5b2c8.tar.gz rust-0a34ce49ceab68a75dd34f1e76555396a8b5b2c8.zip | |
Add and use `IndexVec::append`
Diffstat (limited to 'compiler/rustc_index/src')
| -rw-r--r-- | compiler/rustc_index/src/vec.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_index/src/vec.rs b/compiler/rustc_index/src/vec.rs index 7438c97eb58..1cb8bc861af 100644 --- a/compiler/rustc_index/src/vec.rs +++ b/compiler/rustc_index/src/vec.rs @@ -188,6 +188,11 @@ impl<I: Idx, T> IndexVec<I, T> { let min_new_len = elem.index() + 1; self.raw.resize_with(min_new_len, fill_value); } + + #[inline] + pub fn append(&mut self, other: &mut Self) { + self.raw.append(&mut other.raw); + } } /// `IndexVec` is often used as a map, so it provides some map-like APIs. |
