diff --git a/nalgebra-sparse/src/io/matrix_market.rs b/nalgebra-sparse/src/io/matrix_market.rs index 36ca5ca4..975c586e 100644 --- a/nalgebra-sparse/src/io/matrix_market.rs +++ b/nalgebra-sparse/src/io/matrix_market.rs @@ -1455,12 +1455,10 @@ fn next_dense_coordinate( /// assert_eq!(expected_str,generated_matrixmarket_str); /// # Ok(()) } /// ``` -pub fn save_to_matrix_market_str( - sparse_matrix: &S, -) -> String +pub fn save_to_matrix_market_str(sparse_matrix: &S) -> String where T: MatrixMarketScalar, - S: MatrixMarketExport + S: MatrixMarketExport, { let mut bytes = Vec::::new(); // This will call impl Write for Vec @@ -1496,10 +1494,7 @@ where /// save_to_matrix_market_file(&matrix,"path/to/matrix.mtx")?; /// # Ok(()) } /// ``` -pub fn save_to_matrix_market_file( - sparse_matrix: &S, - path: P, -) -> Result<(), std::io::Error> +pub fn save_to_matrix_market_file(sparse_matrix: &S, path: P) -> Result<(), std::io::Error> where T: MatrixMarketScalar, S: MatrixMarketExport, @@ -1519,14 +1514,11 @@ where /// /// This is the most general save functionality. See [save_to_matrix_market_file] and /// [save_to_matrix_market_str] for higher-level functionality. -pub fn save_to_matrix_market( - mut w: W, - sparse_matrix: &S, -) -> Result<(), std::io::Error> +pub fn save_to_matrix_market(mut w: W, sparse_matrix: &S) -> Result<(), std::io::Error> where T: MatrixMarketScalar, S: MatrixMarketExport, - W: Write + W: Write, { // write header writeln!(