fn work(&mut self, fuel: &mut isize) {
        let variant = replace(self, MergeVariant::Complete(None));
        if let MergeVariant::InProgress(b1, b2, mut merge) = variant {
            merge.work(&b1, &b2, fuel);
            if *fuel > 0 {
                *self = MergeVariant::Complete(Some(merge.done()));
            } else {
                *self = MergeVariant::InProgress(b1, b2, merge);
            }
        } else {
            *self = variant;
        }
    }
/// Applies some amount of work, potentially completing the merge.
///
/// In case the work completes, the source batches are returned.
/// This allows the caller to manage the released resources.
Applies some amount of work, potentially completing the merge.
In case the work completes, the source batches are returned.
This allows the caller to manage the released resources.
Applies some amount of work potentially completing the merge . In case the work completes the source batches are returned . This allows the caller to manage the released resources .
fn work(&mut self, fuel: &mut isize) {
        let variant = replace(self, MergeVariant::Complete(None));
        if let MergeVariant::InProgress(b1, b2, mut merge) = variant {
            merge.work(&b1, &b2, fuel);
            if *fuel > 0 {
                *self = MergeVariant::Complete(Some(merge.done()));
            } else {
                *self = MergeVariant::InProgress(b1, b2, merge);
            }
        } else {
            *self = variant;
        }
    }
fn work ( & mut self , fuel : & mut isize ) { let variant = replace ( self , MergeVariant :: Complete ( None ) ) ; if let MergeVariant :: InProgress ( b1 , b2 , mut merge ) = variant { merge . work ( & b1 , & b2 , fuel ) ; if * fuel > 0 { * self = MergeVariant :: Complete ( Some ( merge . done ( ) ) ) ; } else { * self = MergeVariant :: InProgress ( b1 , b2 , merge ) ; } } else { * self = variant ; } }
Applies some amount of work, potentially completing the merge.
Applies some amount of work potentially completing the merge .
&mut self
fuel
&mut isize