Skip to content

Commit 4ca4709

Browse files
committed
Mark PyStruct as ThreadSafe
1 parent 8938125 commit 4ca4709

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vm/src/stdlib/pystruct.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mod _struct {
2727
objtuple::PyTuple, objtype::PyClassRef,
2828
};
2929
use crate::pyobject::{
30-
Either, PyClassImpl, PyObjectRef, PyRef, PyResult, PyValue, TryFromObject,
30+
Either, PyClassImpl, PyObjectRef, PyRef, PyResult, PyValue, ThreadSafe, TryFromObject,
3131
};
3232
use crate::VirtualMachine;
3333

@@ -679,6 +679,8 @@ mod _struct {
679679
fmt_str: PyStringRef,
680680
}
681681

682+
impl ThreadSafe for PyStruct {}
683+
682684
impl PyValue for PyStruct {
683685
fn class(vm: &VirtualMachine) -> PyClassRef {
684686
vm.class("_struct", "Struct")

0 commit comments

Comments
 (0)