Added Vec append to BufferVec - Issue #3531 (#8575)

# Objective

- Fixes #3531 

## Solution

- Added an append wrapper to BufferVec based on the function signature
for vec.append()

---

First PR to Bevy. I didn't see any tests for other BufferVec methods
(could have missed them) and currently this method is not used anywhere
in the project. Let me know if there are tests to add or if I should
find somewhere to use append so it is not dead code. The issue mentions
implementing `truncate` and `extend` which were already implemented and
merged
[here](https://github.com/bevyengine/bevy/pull/6833/files#diff-c8fb332382379e383f1811e30c31991b1e0feb38ca436c357971755368012ced)
This commit is contained in:
Connor McMillin 2023-05-09 10:25:50 -07:00 committed by GitHub
parent b4218a4443
commit f786ad4906
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,6 +75,10 @@ impl<T: Pod> BufferVec<T> {
index
}
pub fn append(&mut self, other: &mut BufferVec<T>) {
self.values.append(&mut other.values);
}
pub fn set_label(&mut self, label: Option<&str>) {
let label = label.map(str::to_string);