Skip to content

Commit

Permalink
Remove BatchContainer::copy_slice
Browse files Browse the repository at this point in the history
  • Loading branch information
frankmcsherry committed Dec 23, 2023
1 parent 334f55d commit f9a2dc4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
5 changes: 0 additions & 5 deletions src/trace/implementations/huffman_container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,6 @@ where
}
}
}
fn copy_slice(&mut self, slice: &[Vec<B>]) {
for item in slice {
self.copy_push(item);
}
}
fn copy_range(&mut self, other: &Self, start: usize, end: usize) {
for index in start .. end {
self.copy(other.index(index));
Expand Down
29 changes: 0 additions & 29 deletions src/trace/implementations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,6 @@ impl BatchContainer for OffsetList {
self.push(item.0);
}

fn copy_slice(&mut self, slice: &[Self::PushItem]) {
for index in slice {
self.push(*index);
}
}

fn copy_range(&mut self, other: &Self, start: usize, end: usize) {
for offset in start..end {
self.push(other.index(offset));
Expand Down Expand Up @@ -343,8 +337,6 @@ pub mod containers {
fn copy_push(&mut self, item: &Self::PushItem);
/// Inserts a borrowed item.
fn copy(&mut self, item: Self::ReadItem<'_>);
/// Extends from a slice of items.
fn copy_slice(&mut self, slice: &[Self::PushItem]);
/// Extends from a range of items in another`Self`.
fn copy_range(&mut self, other: &Self, start: usize, end: usize);
/// Creates a new container with sufficient capacity.
Expand Down Expand Up @@ -426,9 +418,6 @@ pub mod containers {
fn copy(&mut self, item: &T) {
self.push(item.clone());
}
fn copy_slice(&mut self, slice: &[T]) {
self.extend_from_slice(slice);
}
fn copy_range(&mut self, other: &Self, start: usize, end: usize) {
self.extend_from_slice(&other[start .. end]);
}
Expand Down Expand Up @@ -461,12 +450,6 @@ pub mod containers {
fn copy(&mut self, item: &T) {
self.copy(item);
}
fn copy_slice(&mut self, slice: &[Self::PushItem]) {
self.reserve_items(slice.iter());
for item in slice.iter() {
self.copy(item);
}
}
fn copy_range(&mut self, other: &Self, start: usize, end: usize) {
let slice = &other[start .. end];
self.reserve_items(slice.iter());
Expand Down Expand Up @@ -522,11 +505,6 @@ pub mod containers {
}
self.offsets.push(self.inner.len());
}
fn copy_slice(&mut self, slice: &[Vec<B>]) {
for item in slice {
self.copy(item);
}
}
fn copy_range(&mut self, other: &Self, start: usize, end: usize) {
for index in start .. end {
self.copy(other.index(index));
Expand Down Expand Up @@ -627,8 +605,6 @@ pub mod containers {
}
}
}



impl<B> BatchContainer for SliceContainer2<B>
where
Expand All @@ -651,11 +627,6 @@ pub mod containers {
}
self.offsets.push(self.inner.len());
}
fn copy_slice(&mut self, slice: &[Vec<B>]) {
for item in slice {
self.copy_push(item);
}
}
fn copy_range(&mut self, other: &Self, start: usize, end: usize) {
for index in start .. end {
self.copy(other.index(index));
Expand Down

0 comments on commit f9a2dc4

Please sign in to comment.