/// Gets the number of elements from the OFF file from rank 1 up to rank
/// max(3, dim - 1). For the purposes of the OFF format, the 2-elements of
/// a polygon are taken to be its components.
///
/// This function ought to only be called when the rank is at least 2.
Gets the number of elements from the OFF file from rank 1 up to rank
max(3, dim - 1). For the purposes of the OFF format, the 2-elements of
a polygon are taken to be its components.

This function ought to only be called when the rank is at least 2.
Gets the number of elements from the OFF file from rank 1 up to rank max ( 3 dim - 1 ) . For the purposes of the OFF format the 2 - elements of a polygon are taken to be its components . This function ought to only be called when the rank is at least 2 .
fn el_nums(&mut self, rank: usize) -> OffParseResult<Vec<usize>> {
        debug_assert!(rank >= 2);
        let mut el_nums = Vec::with_capacity(rank - 1);
        // Reads entries one by one.
        for _ in 1..rank {
            el_nums.push(self.iter.parse_next()?);
        }
        // A polygon always has as many vertices as edges.
        if rank == 3 {
            el_nums.push(el_nums[0]);
        }
        // 2-elements go before 1-elements, we're undoing that.
        el_nums.swap(1, 2);
        Ok(el_nums)
    }
fn el_nums ( & mut self , rank : usize ) -> OffParseResult < Vec < usize > > { debug_assert ! ( rank 2 ) ; let mut el_nums = Vec :: with_capacity ( rank - 1 ) ; // Reads entries one by one. for _ in 1 .. rank { el_nums . push ( self . iter . parse_next ( ) ? ) ; } // A polygon always has as many vertices as edges. if rank == 3 { el_nums . push ( el_nums [ 0 ] ) ; } // 2-elements go before 1-elements, we're undoing that. el_nums . swap ( 1 , 2 ) ; Ok ( el_nums ) }
Gets the number of elements from the OFF file from rank 1 up to rank
max(3, dim - 1).
Gets the number of elements from the OFF file from rank 1 up to rank max ( 3 dim - 1 ) .
&mut self
rank
usize