From 80e77d2f9f0ed0e3d787e972ce598779d5fc599c Mon Sep 17 00:00:00 2001 From: Andreas Longva Date: Mon, 13 Jun 2022 09:55:16 +0200 Subject: [PATCH] Fix formatting --- nalgebra-sparse/src/io/matrix_market.rs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) 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!(