Skip to content

Commit cd42d04

Browse files
committed
Mark PyFloat as ThreadSafe
1 parent ad88337 commit cd42d04

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vm/src/obj/objfloat.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use crate::function::{OptionalArg, OptionalOption};
1313
use crate::pyhash;
1414
use crate::pyobject::{
1515
IntoPyObject, PyArithmaticValue::*, PyClassImpl, PyComparisonValue, PyContext, PyObjectRef,
16-
PyRef, PyResult, PyValue, TryFromObject, TypeProtocol,
16+
PyRef, PyResult, PyValue, ThreadSafe, TryFromObject, TypeProtocol,
1717
};
1818
use crate::vm::VirtualMachine;
1919

@@ -24,6 +24,8 @@ pub struct PyFloat {
2424
value: f64,
2525
}
2626

27+
impl ThreadSafe for PyFloat {}
28+
2729
impl PyFloat {
2830
pub fn to_f64(self) -> f64 {
2931
self.value

0 commit comments

Comments
 (0)