Skip to main content

refs_cmp

Function refs_cmp 

Source
fn refs_cmp<D: Data>(
    a: (Timestamp, Ref<'_, D>),
    b: (Timestamp, Ref<'_, D>),
) -> Ordering
Expand description

Compare two (time, data) pairs of columnar refs that have unrelated input lifetimes.

<D::Container as Borrow>::Ref<'a> is an associated-type projection through a trait, so the compiler treats it as invariant in 'a and won’t auto-shorten the inputs by variance. We instead explicitly reborrow both to a fresh, local lifetime 'x via Columnar::reborrow before letting the inner cmp pick up the for<'a> Ref<'a>: Ord bound on Data.