implemented method append for struct MoveBuffer
This commit is contained in:
@@ -20,6 +20,11 @@ impl MoveBuffer {
|
|||||||
self.buffer[self.count] = bitmove;
|
self.buffer[self.count] = bitmove;
|
||||||
self.count += 1;
|
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)]
|
#[inline(always)]
|
||||||
pub fn clear(&mut self) {
|
pub fn clear(&mut self) {
|
||||||
self.count = 0;
|
self.count = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user