From 01a5fa1ba9f8513a15c4b9a2dcaaa33c2f342368 Mon Sep 17 00:00:00 2001 From: Gyubong Lee Date: Mon, 25 Jul 2022 17:42:29 +0900 Subject: [PATCH] Reflect feedback --- common/src/hash.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/common/src/hash.rs b/common/src/hash.rs index c91f1a5eb..edfa6f537 100644 --- a/common/src/hash.rs +++ b/common/src/hash.rs @@ -95,11 +95,7 @@ pub fn hash_float(value: f64) -> Option { // cpython _Py_HashDouble if !value.is_finite() { return if value.is_infinite() { - if value > 0.0 { - Some(INF) - } else { - Some(-INF) - } + Some(if value > 0.0 { INF } else { -INF }) } else { None };