fn row_args(&self) -> RowArgs {
        let mut res = RowArgs {
            rows_count: self.rows_count,
            ..RowArgs::default()
        };

        // compute the rows per file.
        let rows_count = u64::from(self.rows_count);
        if let Some(rows_per_file) = self.rows_per_file {
            let (inserts_count, final_insert_rows_count) = div_rem_plus_one(rows_per_file, rows_count);
            res.inserts_count = inserts_count.try_into().expect("--rows-per-file is too large");
            res.final_insert_rows_count = final_insert_rows_count.try_into().unwrap();
            res.rows_per_file = rows_per_file;
        } else {
            res.inserts_count = self.inserts_count;
            res.final_insert_rows_count = self.rows_count;
            res.rows_per_file = u64::from(self.inserts_count) * rows_count;
        }

        // compute the total number of rows.
        if let Some(total_rows_count) = self.total_count {
            let (files_count, excess_rows_count) = div_rem_plus_one(total_rows_count, res.rows_per_file);
            res.files_count = files_count.try_into().expect("--total-count is too large");
            if excess_rows_count == res.rows_per_file {
                res.last_file_inserts_count = res.inserts_count;
                res.last_file_final_insert_rows_count = res.final_insert_rows_count;
            } else {
                let (inserts_count, final_insert_rows_count) = div_rem_plus_one(excess_rows_count, rows_count);
                res.last_file_inserts_count = inserts_count.try_into().expect("--rows-per-file is too large");
                res.last_file_final_insert_rows_count = final_insert_rows_count.try_into().unwrap();
            }
            res.total_count = total_rows_count;
        } else {
            res.files_count = self.files_count;
            res.last_file_inserts_count = self.last_file_inserts_count.unwrap_or(res.inserts_count);
            res.last_file_final_insert_rows_count = self.last_insert_rows_count.unwrap_or(res.final_insert_rows_count);
            res.total_count = u64::from(res.files_count - 1) * res.rows_per_file
                + u64::from(res.last_file_inserts_count - 1) * rows_count
                + u64::from(res.last_file_final_insert_rows_count);
        }

        res
    }
/// Computes the row-related arguments.
Computes the row-related arguments.
Computes the row - related arguments .
fn row_args(&self) -> RowArgs {
        let mut res = RowArgs {
            rows_count: self.rows_count,
            ..RowArgs::default()
        };
        // compute the rows per file.
        let rows_count = u64::from(self.rows_count);
        if let Some(rows_per_file) = self.rows_per_file {
            let (inserts_count, final_insert_rows_count) = div_rem_plus_one(rows_per_file, rows_count);
            res.inserts_count = inserts_count.try_into().expect("--rows-per-file is too large");
            res.final_insert_rows_count = final_insert_rows_count.try_into().unwrap();
            res.rows_per_file = rows_per_file;
        } else {
            res.inserts_count = self.inserts_count;
            res.final_insert_rows_count = self.rows_count;
            res.rows_per_file = u64::from(self.inserts_count) * rows_count;
        }
        // compute the total number of rows.
        if let Some(total_rows_count) = self.total_count {
            let (files_count, excess_rows_count) = div_rem_plus_one(total_rows_count, res.rows_per_file);
            res.files_count = files_count.try_into().expect("--total-count is too large");
            if excess_rows_count == res.rows_per_file {
                res.last_file_inserts_count = res.inserts_count;
                res.last_file_final_insert_rows_count = res.final_insert_rows_count;
            } else {
                let (inserts_count, final_insert_rows_count) = div_rem_plus_one(excess_rows_count, rows_count);
                res.last_file_inserts_count = inserts_count.try_into().expect("--rows-per-file is too large");
                res.last_file_final_insert_rows_count = final_insert_rows_count.try_into().unwrap();
            }
            res.total_count = total_rows_count;
        } else {
            res.files_count = self.files_count;
            res.last_file_inserts_count = self.last_file_inserts_count.unwrap_or(res.inserts_count);
            res.last_file_final_insert_rows_count = self.last_insert_rows_count.unwrap_or(res.final_insert_rows_count);
            res.total_count = u64::from(res.files_count - 1) * res.rows_per_file
                + u64::from(res.last_file_inserts_count - 1) * rows_count
                + u64::from(res.last_file_final_insert_rows_count);
        }
        res
    }
fn row_args ( & self ) -> RowArgs { let mut res = RowArgs { rows_count : self . rows_count , .. RowArgs :: default ( ) } ; // compute the rows per file. let rows_count = u64 :: from ( self . rows_count ) ; if let Some ( rows_per_file ) = self . rows_per_file { let ( inserts_count , final_insert_rows_count ) = div_rem_plus_one ( rows_per_file , rows_count ) ; res . inserts_count = inserts_count . try_into ( ) . expect ( " " ) ; res . final_insert_rows_count = final_insert_rows_count . try_into ( ) . unwrap ( ) ; res . rows_per_file = rows_per_file ; } else { res . inserts_count = self . inserts_count ; res . final_insert_rows_count = self . rows_count ; res . rows_per_file = u64 :: from ( self . inserts_count ) * rows_count ; } // compute the total number of rows. if let Some ( total_rows_count ) = self . total_count { let ( files_count , excess_rows_count ) = div_rem_plus_one ( total_rows_count , res . rows_per_file ) ; res . files_count = files_count . try_into ( ) . expect ( " " ) ; if excess_rows_count == res . rows_per_file { res . last_file_inserts_count = res . inserts_count ; res . last_file_final_insert_rows_count = res . final_insert_rows_count ; } else { let ( inserts_count , final_insert_rows_count ) = div_rem_plus_one ( excess_rows_count , rows_count ) ; res . last_file_inserts_count = inserts_count . try_into ( ) . expect ( " " ) ; res . last_file_final_insert_rows_count = final_insert_rows_count . try_into ( ) . unwrap ( ) ; } res . total_count = total_rows_count ; } else { res . files_count = self . files_count ; res . last_file_inserts_count = self . last_file_inserts_count . unwrap_or ( res . inserts_count ) ; res . last_file_final_insert_rows_count = self . last_insert_rows_count . unwrap_or ( res . final_insert_rows_count ) ; res . total_count = u64 :: from ( res . files_count - 1 ) * res . rows_per_file + u64 :: from ( res . last_file_inserts_count - 1 ) * rows_count + u64 :: from ( res . last_file_final_insert_rows_count ) ; } res }
Computes the row-related arguments.
Computes the row - related arguments .
&self
&self