From 3840708970fbc50ffec1afada3a7052e08de89c3 Mon Sep 17 00:00:00 2001 From: PThorpe92 Date: Sat, 2 Aug 2025 23:09:57 -0400 Subject: [PATCH] Add safety comment --- core/io/vfs.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/io/vfs.rs b/core/io/vfs.rs index 13beb365c..c2b2d2763 100644 --- a/core/io/vfs.rs +++ b/core/io/vfs.rs @@ -77,6 +77,9 @@ impl VfsMod { } } +// #Safety: +// the callback wrapper in the extension library is FnOnce, so we know +// that the into_raw/from_raw contract will hold unsafe extern "C" fn callback_fn(result: i32, ctx: SendPtr) { let completion = Completion { inner: (Arc::from_raw(ctx.inner().as_ptr() as *mut CompletionInner)),