From c1b4498a652cfc94061f9525a1f0a16ccb976180 Mon Sep 17 00:00:00 2001 From: Michael Neumann Date: Sat, 6 Apr 2019 20:10:57 +0200 Subject: [PATCH] Rust rustfmt --- src/lib.rs | 11 ++++++----- src/weight_matrix.rs | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 0506570..186950b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -538,10 +538,11 @@ fn test_step5() { #[test] fn test_solve() { - let c = vec![250, 400, 350, // row 1 - 400, 600, 350, // row 2 - 200, 400, 250 // row 3 - ]; + let c = vec![ + 250, 400, 350, // row 1 + 400, 600, 350, // row 2 + 200, 400, 250, // row 3 + ]; let mut weights: WeightMatrix = WeightMatrix::from_row_vec(3, c); let matching = solve_assignment(&mut weights).unwrap(); @@ -607,7 +608,7 @@ fn test_solve_equal_rows2() { fn test_solve_equal_rows5() { const N: usize = 5; let c = vec![ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ]; let mut weights: WeightMatrix = WeightMatrix::from_row_vec(N, c.clone()); diff --git a/src/weight_matrix.rs b/src/weight_matrix.rs index 85d94e7..d7cf000 100644 --- a/src/weight_matrix.rs +++ b/src/weight_matrix.rs @@ -1,6 +1,6 @@ +use crate::SquareMatrix; use crate::WeightNum; use crate::Weights; -use crate::SquareMatrix; #[derive(Debug)] pub struct WeightMatrix {