Skip to content

Commit

Permalink
perf(python): use PyFloatMethods::value() instead of generic extract
Browse files Browse the repository at this point in the history
  • Loading branch information
rasendubi committed Sep 27, 2024
1 parent a327229 commit fdef9fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eppo_core/src/attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ mod pyo3_impl {
return Ok(AttributeValue::Boolean(s.is_true()));
}
if let Ok(s) = value.downcast::<PyFloat>() {
return Ok(AttributeValue::Number(s.extract()?));
return Ok(AttributeValue::Number(s.value()));
}
if let Ok(s) = value.downcast::<PyInt>() {
return Ok(AttributeValue::Number(s.extract()?));
Expand Down

0 comments on commit fdef9fe

Please sign in to comment.