fn insert_at(&mut self, batch: Option<B>, index: usize) {
        // Ensure the spine is large enough.
        while self.merging.len() <= index {
            self.merging.push(MergeState::Vacant);
        }

        // Insert the batch at the location.
        match self.merging[index].take() {
            MergeState::Vacant => {
                self.merging[index] = MergeState::Single(batch);
            }
            MergeState::Single(old) => {
                self.merging[index] = MergeState::begin_merge(old, batch);
            }
            MergeState::Double(_) => {
                panic!("Attempted to insert batch into incomplete merge!")
            }
        };
    }
/// Inserts a batch at a specific location.
///
/// This is a non-public internal method that can panic if we try and insert
/// into a layer which already contains two batches (and is still in the
/// process of merging).
Inserts a batch at a specific location.
This is a non-public internal method that can panic if we try and insert
into a layer which already contains two batches (and is still in the
process of merging).
Inserts a batch at a specific location . This is a non - public internal method that can panic if we try and insert into a layer which already contains two batches ( and is still in the process of merging ) .
fn insert_at(&mut self, batch: Option<B>, index: usize) {
        // Ensure the spine is large enough.
        while self.merging.len() <= index {
            self.merging.push(MergeState::Vacant);
        }
        // Insert the batch at the location.
        match self.merging[index].take() {
            MergeState::Vacant => {
                self.merging[index] = MergeState::Single(batch);
            }
            MergeState::Single(old) => {
                self.merging[index] = MergeState::begin_merge(old, batch);
            }
            MergeState::Double(_) => {
                panic!("Attempted to insert batch into incomplete merge!")
            }
        };
    }
fn insert_at ( & mut self , batch : Option < B > , index : usize ) { // Ensure the spine is large enough. while self . merging . len ( ) <= index { self . merging . push ( MergeState :: Vacant ) ; } // Insert the batch at the location. match self . merging [ index ] . take ( ) { MergeState :: Vacant => { self . merging [ index ] = MergeState :: Single ( batch ) ; } MergeState :: Single ( old ) => { self . merging [ index ] = MergeState :: begin_merge ( old , batch ) ; } MergeState :: Double ( _ ) => { panic ! ( " " ) } } ; }
Inserts a batch at a specific location.
Inserts a batch at a specific location .
&mut self
batch
Option<B>
index
usize