pub fn maybe_advance<F>(&mut self, frontier: F)
    where
        F: IntoIterator<Item = T>,
    {
        // TODO(rkhaitan): do this without the extra allocations.
        let mut new_frontier = Antichain::new();
        new_frontier.extend(frontier.into_iter());

        if !<_ as PartialOrder>::less_equal(&self.antichain.frontier(), &new_frontier.borrow()) {
            log::trace!(
                "Ignoring request to 'advance' to {:?} current antichain {:?}",
                new_frontier,
                self.antichain
            );
            return;
        }
        self.changes.borrow_mut().extend(
            self.antichain
                .frontier()
                .into_iter()
                .cloned()
                .map(|time| (time, -1)),
        );
        self.changes.borrow_mut().extend(
            new_frontier
                .elements()
                .into_iter()
                .cloned()
                .map(|time| (time, 1)),
        );
        (self.action.borrow_mut())(
            self.antichain
                .update_iter(self.changes.borrow_mut().drain()),
        );
    }
/// Advance the frontier of the mutable antichain to `frontier`, if `frontier` is
/// ahead of the current frontier.
///
/// This function intentionally does not assert that `frontier` will necessarily
/// be in advance of the current frontier because some uses in the Coordinator don't
/// work well with that. Specifically, in the Coordinator its possible for a `since`
/// frontier to be ahead of the `upper` frontier for an index, and changes to the
/// `upper` frontier cause the Coordinator to want to "advance" the `since` to
/// `new_upper - logical_compaction_window` which might not be in advance of the
/// existing `since` frontier.
/// TODO: can we remove `maybe_advance` and replace with a stricter `advace` that
/// requires callers to present incresing frontiers?
Advance the frontier of the mutable antichain to `frontier`, if `frontier` is
ahead of the current frontier.

This function intentionally does not assert that `frontier` will necessarily
be in advance of the current frontier because some uses in the Coordinator don't
work well with that.
Advance the frontier of the mutable antichain to ` frontier ` if ` frontier ` is ahead of the current frontier . This function intentionally does not assert that ` frontier ` will necessarily be in advance of the current frontier because some uses in the Coordinator don ' t work well with that .
pub fn maybe_advance<F>(&mut self, frontier: F)
    where
        F: IntoIterator<Item = T>,
    {
        // TODO(rkhaitan): do this without the extra allocations.
        let mut new_frontier = Antichain::new();
        new_frontier.extend(frontier.into_iter());
        if !<_ as PartialOrder>::less_equal(&self.antichain.frontier(), &new_frontier.borrow()) {
            log::trace!(
                "Ignoring request to 'advance' to {:?} current antichain {:?}",
                new_frontier,
                self.antichain
            );
            return;
        }
        self.changes.borrow_mut().extend(
            self.antichain
                .frontier()
                .into_iter()
                .cloned()
                .map(|time| (time, -1)),
        );
        self.changes.borrow_mut().extend(
            new_frontier
                .elements()
                .into_iter()
                .cloned()
                .map(|time| (time, 1)),
        );
        (self.action.borrow_mut())(
            self.antichain
                .update_iter(self.changes.borrow_mut().drain()),
        );
    }
pub fn maybe_advance < F > ( & mut self , frontier : F ) where F : IntoIterator < Item = T > , { // TODO(rkhaitan): do this without the extra allocations. let mut new_frontier = Antichain :: new ( ) ; new_frontier . extend ( frontier . into_iter ( ) ) ; if ! < _ as PartialOrder > :: less_equal ( & self . antichain . frontier ( ) , & new_frontier . borrow ( ) ) { log :: trace ! ( " " new_frontier self antichain ) ; return ; } self . changes . borrow_mut ( ) . extend ( self . antichain . frontier ( ) . into_iter ( ) . cloned ( ) . map ( | time | ( time , - 1 ) ) , ) ; self . changes . borrow_mut ( ) . extend ( new_frontier . elements ( ) . into_iter ( ) . cloned ( ) . map ( | time | ( time , 1 ) ) , ) ; ( self . action . borrow_mut ( ) ) ( self . antichain . update_iter ( self . changes . borrow_mut ( ) . drain ( ) ) , ) ; }
Advance the frontier of the mutable antichain to `frontier`, if `frontier` is
ahead of the current frontier.
Advance the frontier of the mutable antichain to ` frontier ` if ` frontier ` is ahead of the current frontier .
&mut self
frontier
F
&mut self
frontier
F