From 4bcf581a4670ab7c557e6b151e11c95a94d1b1ea Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Fri, 8 Dec 2023 17:44:53 +0100 Subject: [PATCH] docs --- crates/goblin-pyo3/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/goblin-pyo3/src/lib.rs b/crates/goblin-pyo3/src/lib.rs index a0f9a60..323fa68 100644 --- a/crates/goblin-pyo3/src/lib.rs +++ b/crates/goblin-pyo3/src/lib.rs @@ -137,9 +137,9 @@ impl Drop for Object { drop(obj); // SAFETY: - // We took `ptr` and `len` from the vec earlier, - // then leaked it to get a stic reference to it which was only held within `self.inner`, - // which has been dropped above. + // We took `ptr` and `len` from the vec earlier (and ensured `len` == `cap`), + // then leaked it to get a static reference to it + // which was only held within `self.inner`, which has been dropped above. unsafe { let vec = Vec::from_raw_parts(self.ptr, self.len, self.len); drop(vec);