mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
# 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:
parent
b4218a4443
commit
f786ad4906
1 changed files with 4 additions and 0 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue