@@ -36,7 +36,7 @@ pub struct PyMemoryViewNewArgs {
36
36
pub struct PyMemoryView {
37
37
// avoid double release when memoryview had released the buffer before drop
38
38
buffer : ManuallyDrop < PyBuffer > ,
39
- // the released memoryview does not mean the buffer is destoryed
39
+ // the released memoryview does not mean the buffer is destroyed
40
40
// because the possible another memeoryview is viewing from it
41
41
released : AtomicCell < bool > ,
42
42
// start does NOT mean the bytes before start will not be visited,
@@ -67,7 +67,7 @@ impl PyMemoryView {
67
67
FormatSpec :: parse ( format. as_bytes ( ) , vm)
68
68
}
69
69
70
- /// this should be the main entrence to create the memoryview
70
+ /// this should be the main entrance to create the memoryview
71
71
/// to avoid the chained memoryview
72
72
pub fn from_object ( obj : & PyObject , vm : & VirtualMachine ) -> PyResult < Self > {
73
73
if let Some ( other) = obj. payload :: < Self > ( ) {
@@ -78,7 +78,7 @@ impl PyMemoryView {
78
78
}
79
79
}
80
80
81
- /// don't use this function to create the memeoryview if the buffer is exporting
81
+ /// don't use this function to create the memoryview if the buffer is exporting
82
82
/// via another memoryview, use PyMemoryView::new_view() or PyMemoryView::from_object
83
83
/// to reduce the chain
84
84
pub fn from_buffer ( buffer : PyBuffer , vm : & VirtualMachine ) -> PyResult < Self > {
@@ -113,7 +113,7 @@ impl PyMemoryView {
113
113
Ok ( zelf)
114
114
}
115
115
116
- /// this should be the only way to create a memroyview from another memoryview
116
+ /// this should be the only way to create a memoryview from another memoryview
117
117
pub fn new_view ( & self ) -> Self {
118
118
let zelf = PyMemoryView {
119
119
buffer : self . buffer . clone ( ) ,
0 commit comments