summaryrefslogtreecommitdiff
path: root/src/util.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-03-30 22:58:28 +0200
committerHampusM <hampus@hampusmat.com>2025-03-30 22:58:28 +0200
commit88414e46f5a8c127d7a8e5613276913f2b1ad141 (patch)
tree9f144ef2fa3a3ce31cb7474f12aef3f0b0e89b52 /src/util.rs
parentf5a482faa1e4302e879533b9ce4e5a956af00cee (diff)
fix: add missing FieldOwned Drop impl
Diffstat (limited to 'src/util.rs')
-rw-r--r--src/util.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/util.rs b/src/util.rs
index 22f5fb7..ba60395 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -68,6 +68,11 @@ impl AnonUnique
{
unsafe { std::slice::from_raw_parts(self.ptr.as_ptr(), self.layout.size()) }
}
+
+ pub fn as_ptr(&self) -> NonNull<MaybeUninit<u8>>
+ {
+ self.ptr
+ }
}
impl Drop for AnonUnique