implemented method append for struct MoveBuffer

This commit is contained in:
Varga Dávid Lajos
2025-11-19 16:13:34 +01:00
parent f417a7e47c
commit f39c113ef9

View File

@@ -20,6 +20,11 @@ impl MoveBuffer {
self.buffer[self.count] = bitmove;
self.count += 1;
}
#[inline]
pub fn append(&mut self, other: &MoveBuffer) {
self.buffer[self.count..self.count + other.count()].copy_from_slice(other.contents());
self.count += other.count();
}
#[inline(always)]
pub fn clear(&mut self) {
self.count = 0;