Skip to content

Commit 0a99920

Browse files
committed
Freeze the slice container pyclass as it does not need mutable access (or any access at all).
1 parent 53707f3 commit 0a99920

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/slice_container.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use ndarray::{ArrayBase, Dimension, OwnedRepr};
44
use pyo3::pyclass;
55

66
/// Utility type to safely store `Box<[_]>` or `Vec<_>` on the Python heap
7-
#[pyclass]
7+
#[pyclass(frozen)]
88
pub(crate) struct PySliceContainer {
99
pub(crate) ptr: *mut u8,
1010
pub(crate) len: usize,

0 commit comments

Comments
 (0)