fn initialized_at<T: CloneTuple>(product: &Product<T, ()>, ri: usize) -> &[T] {
            let is_consuming_relation =
                (0..ri).all(|i| product.indices[i] == product.relations[i].len() - 1);
            let uninit_values = if is_consuming_relation {
                &product.relations[ri][product.indices[ri]..]
            } else {
                &product.relations[ri]
            };

            // SAFETY: in a slice, MaybeUninit<T> preserves the same layout and
            // semantics as T. Furthermore, values starting at `indices[ri]`
            // are initialized.
            unsafe { std::mem::transmute::<&[MaybeUninit<T>], &[T]>(uninit_values) }
        }
// Values at the given index of a given relation are only dropped once
// they are no longer useful. We consider that `relations[ri][i]` is no
// longer useful if `indices[ri'] == relations[ri'].len() - 1` for all
// `ri' < ri`, and if `i < indices[ri]`.
// We thus define a function to easily compare the initialized values.
Values at the given index of a given relation are only dropped once
they are no longer useful.
Values at the given index of a given relation are only dropped once they are no longer useful .
fn initialized_at<T: CloneTuple>(product: &Product<T, ()>, ri: usize) -> &[T] {
            let is_consuming_relation =
                (0..ri).all(|i| product.indices[i] == product.relations[i].len() - 1);
            let uninit_values = if is_consuming_relation {
                &product.relations[ri][product.indices[ri]..]
            } else {
                &product.relations[ri]
            };
            // SAFETY: in a slice, MaybeUninit<T> preserves the same layout and
            // semantics as T. Furthermore, values starting at `indices[ri]`
            // are initialized.
            unsafe { std::mem::transmute::<&[MaybeUninit<T>], &[T]>(uninit_values) }
        }
fn initialized_at < T : CloneTuple > ( product : & Product < T , ( ) > , ri : usize ) -> & [ T ] { let is_consuming_relation = ( 0 .. ri ) . all ( | i | product . indices [ i ] == product . relations [ i ] . len ( ) - 1 ) ; let uninit_values = if is_consuming_relation { & product . relations [ ri ] [ product . indices [ ri ] .. ] } else { & product . relations [ ri ] } ; // SAFETY: in a slice, MaybeUninit<T> preserves the same layout and // semantics as T. Furthermore, values starting at `indices[ri]` // are initialized. unsafe { std :: mem :: transmute :: < & [ MaybeUninit < T > ] , & [ T ] > ( uninit_values ) } }
Values at the given index of a given relation are only dropped once
they are no longer useful.
Values at the given index of a given relation are only dropped once they are no longer useful .
product
&Product<T, ()>
ri
usize
product
&Product<T, ()>
ri
usize