From fdef9fedecfb2e12fc7834e0b098a9f62fa11410 Mon Sep 17 00:00:00 2001 From: Oleksii Shmalko Date: Fri, 27 Sep 2024 21:53:07 +0300 Subject: [PATCH] perf(python): use PyFloatMethods::value() instead of generic extract --- eppo_core/src/attributes.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eppo_core/src/attributes.rs b/eppo_core/src/attributes.rs index 1fac02fd..ee5d0eea 100644 --- a/eppo_core/src/attributes.rs +++ b/eppo_core/src/attributes.rs @@ -115,7 +115,7 @@ mod pyo3_impl { return Ok(AttributeValue::Boolean(s.is_true())); } if let Ok(s) = value.downcast::() { - return Ok(AttributeValue::Number(s.extract()?)); + return Ok(AttributeValue::Number(s.value())); } if let Ok(s) = value.downcast::() { return Ok(AttributeValue::Number(s.extract()?));