Skip to content

Commit 1c813a9

Browse files
committed
Remove BatchContainer::borrow_as()
1 parent d4be2d0 commit 1c813a9

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

differential-dataflow/src/trace/implementations/huffman_container.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ impl<B: Ord + Clone + 'static> BatchContainer for HuffmanContainer<B> {
9595
Err(bytes) => other.extend_from_slice(bytes),
9696
}
9797
}
98-
fn borrow_as<'a>(owned: &'a Self::Owned) -> Self::ReadItem<'a> { Self::ReadItem { inner: Err(&owned[..]) } }
99-
10098
fn reborrow<'b, 'a: 'b>(item: Self::ReadItem<'a>) -> Self::ReadItem<'b> { item }
10199

102100
fn push_ref(&mut self, item: Self::ReadItem<'_>) { self.push_into(item) }

differential-dataflow/src/trace/implementations/mod.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,6 @@ impl BatchContainer for OffsetList {
353353
#[inline(always)]
354354
fn into_owned<'a>(item: Self::ReadItem<'a>) -> Self::Owned { item }
355355
#[inline(always)]
356-
fn borrow_as<'a>(owned: &'a Self::Owned) -> Self::ReadItem<'a> { *owned }
357-
#[inline(always)]
358356
fn reborrow<'b, 'a: 'b>(item: Self::ReadItem<'a>) -> Self::ReadItem<'b> { item }
359357

360358
fn push_ref(&mut self, item: Self::ReadItem<'_>) { self.push_into(item) }
@@ -538,10 +536,6 @@ pub mod containers {
538536
fn clone_onto<'a>(item: Self::ReadItem<'a>, other: &mut Self::Owned) {
539537
*other = Self::into_owned(item);
540538
}
541-
/// Borrows an owned instance as oneself.
542-
#[must_use]
543-
fn borrow_as<'a>(owned: &'a Self::Owned) -> Self::ReadItem<'a>;
544-
545539

546540
/// Push an item into this container
547541
fn push_ref(&mut self, item: Self::ReadItem<'_>);
@@ -637,7 +631,6 @@ pub mod containers {
637631

638632
#[inline(always)] fn into_owned<'a>(item: Self::ReadItem<'a>) -> Self::Owned { item.clone() }
639633
#[inline(always)] fn clone_onto<'a>(item: Self::ReadItem<'a>, other: &mut Self::Owned) { other.clone_from(item); }
640-
#[inline(always)] fn borrow_as<'a>(owned: &'a Self::Owned) -> Self::ReadItem<'a> { owned }
641634

642635
fn reborrow<'b, 'a: 'b>(item: Self::ReadItem<'a>) -> Self::ReadItem<'b> { item }
643636

@@ -671,7 +664,6 @@ pub mod containers {
671664

672665
#[inline(always)] fn into_owned<'a>(item: Self::ReadItem<'a>) -> Self::Owned { item.clone() }
673666
#[inline(always)] fn clone_onto<'a>(item: Self::ReadItem<'a>, other: &mut Self::Owned) { other.clone_from(item); }
674-
#[inline(always)] fn borrow_as<'a>(owned: &'a Self::Owned) -> Self::ReadItem<'a> { owned }
675667

676668
fn reborrow<'b, 'a: 'b>(item: Self::ReadItem<'a>) -> Self::ReadItem<'b> { item }
677669

@@ -731,7 +723,6 @@ pub mod containers {
731723

732724
#[inline(always)] fn into_owned<'a>(item: Self::ReadItem<'a>) -> Self::Owned { item.to_vec() }
733725
#[inline(always)] fn clone_onto<'a>(item: Self::ReadItem<'a>, other: &mut Self::Owned) { other.clone_from_slice(item); }
734-
#[inline(always)] fn borrow_as<'a>(owned: &'a Self::Owned) -> Self::ReadItem<'a> { &owned[..] }
735726

736727
fn reborrow<'b, 'a: 'b>(item: Self::ReadItem<'a>) -> Self::ReadItem<'b> { item }
737728

0 commit comments

Comments
 (0)