From a74702bb5af6d5fad292b06540bb66908f0708f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20L=C3=B6schner?= Date: Tue, 13 Aug 2019 09:27:24 +0200 Subject: [PATCH] Simplified ordering check --- src/base/ops.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/base/ops.rs b/src/base/ops.rs index 3566a2b5..f389eae5 100644 --- a/src/base/ops.rs +++ b/src/base/ops.rs @@ -876,10 +876,8 @@ impl> Matrix { for e in iter { let ae = abs(*e); - if let Some(ae_ordering) = ae.partial_cmp(&max) { - if ae_ordering == ordering { + if ae.partial_cmp(&max) == Some(ordering) { max = ae; - } } }