put blanket impls in a module
@@ -257,9 +257,15 @@ pub trait Merger<K, V, T, R, Output: Batch<K, V, T, R>> {
}
+/// Blanket implementations for reference counted batches.
+pub mod rc_blanket_impls {
use std::rc::Rc;
+ use ::Diff;
+ use ::lattice::Lattice;
+ use super::{Batch, BatchReader, Batcher, Builder, Merger, Cursor, Description};
+
impl<K, V, T, R, B: BatchReader<K,V,T,R>> BatchReader<K,V,T,R> for Rc<B> {
/// The type used to enumerate the batch's contents.
@@ -365,7 +371,7 @@ impl<K,V,T,R,B:Batch<K,V,T,R>> Merger<K, V, T, R, Rc<B>> for RcMerger<K,V,T,R,B>
fn work(&mut self, source1: &Rc<B>, source2: &Rc<B>, fuel: &mut usize) { self.merger.work(source1, source2, fuel) }
fn done(self) -> Rc<B> { Rc::new(self.merger.done()) }
}
-
+}
