From 1716dd86dbb0ba2cf08ee90d4beabcbfdf0cfe22 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 8 Aug 2015 17:22:47 +0200 Subject: [PATCH] Made tests more readable - missed a function --- tests/mat.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/mat.rs b/tests/mat.rs index 12fc7a0a..f4c70f83 100644 --- a/tests/mat.rs +++ b/tests/mat.rs @@ -54,13 +54,11 @@ macro_rules! test_cholesky_impl( let result = na::cholesky(&randmat); - match result { - Ok(v) => { - let recomp = v * na::transpose(&v); - assert!(na::approx_eq(&randmat, &recomp)); - }, - Err(_) => assert!(false), - } + assert!(result.is_ok()); + + let v = result.unwrap(); + let recomp = v * na::transpose(&v); + assert!(na::approx_eq(&randmat, &recomp)); } ); );