You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: matrix.rs
    path of file: ./repos/notecalc3/notecalc-lib/src
    
    the code of the file until where you have to start completion: use crate::calc::{divide_op, multiply_op, CalcResult, CalcResultType};
use crate::MATRIX_ASCII_HEADER_FOOTER_LINE_COUNT;

#[derive(Debug, Clone, Eq, PartialEq)]
pub struct MatrixData {
    // column major storing
    pub cells: Vec<CalcResult>,
    pub row_count: usize,
    pub col_count: usize,
}

impl MatrixData {
    pub fn new(cells: Vec<CalcResult>, row_count: usize, col_count: usize) -> MatrixData {
        MatrixData {
            cells,
            row_count,
            col_count,
        }
    }

    #[inline]
    pub
    
    pub fn transposed(&self) -> MatrixData {
        let mut result = MatrixData::new(
            Vec::with_capacity(self.cells.len()),
            self.col_count,
            self.row_count,
        );
        for _ in 0..self.cells.len() {
            result.cells.push(CalcResult::hack_empty());
        }
        for (i, cell) in self.cells.iter().enumerate() {
            let row_i = i % result.row_count;
            let col_i = i / result.row_count;
            result.cells[row_i * result.col_count + col_i] = cell.clone()
        }

        return result;
    }